Merge lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0_rec_cron_mdh into lp:banking-addons/bank-statement-reconcile-70

Proposed by Matthieu Dietrich @ camptocamp
Status: Rejected
Rejected by: Nicolas Bessi - Camptocamp
Proposed branch: lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0_rec_cron_mdh
Merge into: lp:banking-addons/bank-statement-reconcile-70
Diff against target: 46 lines (+21/-1)
2 files modified
account_easy_reconcile/easy_reconcile.py (+8/-1)
account_easy_reconcile/easy_reconcile.xml (+13/-0)
To merge this branch: bzr merge lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0_rec_cron_mdh
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Needs Fixing
Review via email: mp+220278@code.launchpad.net

Commit message

[IMP] new scheduler task to reconcile automatically entries

Description of the change

This patch adds a (by default, inactive) scheduler task to process all automatic reconcilations once per day. This is useful in cases lots of unreconciled entries are on a account, and the normal process would take too much time when called by the interface.

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

The idea behind it seems fine by me. But you need to put this data entry in a noupdate="1" data tag, otherwise the people who activate the job will find out some time after a module update that the job has been disabled again. You can remove the forcecreate tag, 'True' is the default value.

Optionally store the xml-entry in a new file (easy_reconcile_cron.xml, or easy_reconcile_data.xml).

review: Needs Fixing
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

This project is now hosted on https://github.com/OCA/bank-statement-reconcile. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Moved to github

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Unmerged revisions

152. By Matthieu Dietrich @ camptocamp

[IMP] add cron job for reconciliation

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_easy_reconcile/easy_reconcile.py'
--- account_easy_reconcile/easy_reconcile.py 2014-03-14 10:48:30 +0000
+++ account_easy_reconcile/easy_reconcile.py 2014-05-20 14:35:11 +0000
@@ -258,7 +258,7 @@
258 _('Error'),258 _('Error'),
259 _('There is no history of reconciled '259 _('There is no history of reconciled '
260 'items on the task: %s.') % rec.name)260 'items on the task: %s.') % rec.name)
261 261
262 def _open_move_line_list(sefl, cr, uid, move_line_ids, name, context=None):262 def _open_move_line_list(sefl, cr, uid, move_line_ids, name, context=None):
263 return {263 return {
264 'name': name,264 'name': name,
@@ -336,3 +336,10 @@
336 if not rec.last_history:336 if not rec.last_history:
337 self._no_history(cr, uid, rec, context=context)337 self._no_history(cr, uid, rec, context=context)
338 return rec.last_history.open_partial()338 return rec.last_history.open_partial()
339
340 def run_scheduler(self, cr, uid, context=None):
341 # Retrieve all easy reconcile ids
342 ids = self.search(cr, uid, [], context=context)
343 # launch run_reconcile action for every item
344 self.run_reconcile(cr, uid, ids, context=context)
345 return True
339346
=== modified file 'account_easy_reconcile/easy_reconcile.xml'
--- account_easy_reconcile/easy_reconcile.xml 2014-04-14 13:09:19 +0000
+++ account_easy_reconcile/easy_reconcile.xml 2014-05-20 14:35:11 +0000
@@ -158,5 +158,18 @@
158 id="menu_easy_reconcile"158 id="menu_easy_reconcile"
159 parent="account.periodical_processing_reconciliation"/>159 parent="account.periodical_processing_reconciliation"/>
160160
161 <record forcecreate="True" id="ir_cron_run_reconciliations" model="ir.cron">
162 <field name="name">Do Automatic Reconciliations</field>
163 <field eval="False" name="active"/>
164 <field name="user_id" ref="base.user_root"/>
165 <field name="interval_number">1</field>
166 <field name="interval_type">days</field>
167 <field name="numbercall">-1</field>
168 <field eval="False" name="doall"/>
169 <field eval="'account.easy.reconcile'" name="model"/>
170 <field eval="'run_scheduler'" name="function"/>
171 <field eval="'()'" name="args"/>
172 </record>
173
161</data>174</data>
162</openerp>175</openerp>

Subscribers

People subscribed via source and target branches