Skip to content
Snippets Groups Projects
Commit 9b6f5dca authored by Olivier Dony's avatar Olivier Dony
Browse files

[FIX] procurement: background procurement scheduler should be working in batch...

[FIX] procurement: background procurement scheduler should be working in batch mode, with one transaction per order

A programming error during an older refactoring lead to
the scheduler working with a single monolithic transaction.
This could cause unnecessary resource contention, plus
undesired rollback of all previous operations in the event
of an exception during scheduling.

bzr revid: odo@openerp.com-20130701163532-8bekn7sbb99ua08c
parent 00c1c134
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
<field eval="False" name="doall"/>
<field eval="'procurement.order'" name="model"/>
<field eval="'run_scheduler'" name="function"/>
<field eval="'(False,)'" name="args"/>
<field eval="'(False,True)'" name="args"/>
</record>
<record id="sequence_mrp_op_type" model="ir.sequence.type">
......
......@@ -36,6 +36,8 @@ class procurement_order(osv.osv):
''' Runs through scheduler.
@param use_new_cursor: False or the dbname
'''
if use_new_cursor:
use_new_cursor = cr.dbname
self._procure_confirm(cr, uid, use_new_cursor=use_new_cursor, context=context)
self._procure_orderpoint_confirm(cr, uid, automatic=automatic,\
use_new_cursor=use_new_cursor, context=context)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment