openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #04154
[Merge] lp:~camptocamp/account-financial-tools/7.0-batch-validate-log-more-lep into lp:account-financial-tools
Leonardo Pistone - camptocamp has proposed merging lp:~camptocamp/account-financial-tools/7.0-batch-validate-log-more-lep into lp:account-financial-tools.
Requested reviews:
Account Core Editors (account-core-editors)
For more details, see:
https://code.launchpad.net/~camptocamp/account-financial-tools/7.0-batch-validate-log-more-lep/+merge/208420
--
https://code.launchpad.net/~camptocamp/account-financial-tools/7.0-batch-validate-log-more-lep/+merge/208420
Your team Account Core Editors is requested to review the proposed merge of lp:~camptocamp/account-financial-tools/7.0-batch-validate-log-more-lep into lp:account-financial-tools.
=== modified file 'account_move_batch_validate/account.py'
--- account_move_batch_validate/account.py 2014-02-21 13:44:05 +0000
+++ account_move_batch_validate/account.py 2014-02-26 16:24:55 +0000
@@ -20,6 +20,8 @@
###############################################################################
"""Accounting customisation for delayed posting."""
+import logging
+
from openerp.osv import fields, orm
from openerp.tools.translate import _
@@ -27,6 +29,8 @@
from openerp.addons.connector.session import ConnectorSession
from openerp.addons.connector.queue.job import OpenERPJobStorage
+_logger = logging.getLogger(__name__)
+
# do a massive write on account moves BLOCK_SIZE at a time
BLOCK_SIZE = 1000
@@ -67,6 +71,12 @@
('state', '=', 'draft'),
], context=context)
+ _logger.info(
+ u'I will now create {0} jobs for posting moves.'.format(
+ len(move_ids)
+ )
+ )
+
for move_id in move_ids:
job_uuid = validate_one_move.delay(session, self._name, move_id,
eta=eta)
@@ -107,6 +117,11 @@
context = {}
# For massive amounts of moves, this becomes necessary to avoid
# MemoryError's
+
+ _logger.info(
+ u'I will now mark {0} moves for posting.'.format(len(move_ids))
+ )
+
for start in xrange(0, len(move_ids), BLOCK_SIZE):
self.write(
cr,
Follow ups