[FIX] procurement: restore fix for background procurement from 9b6f5dc, accidentally reverted by WMS branch for v8

Probably forgotten during a sync with master, as the
fix belongs to a different file now.
This commit is contained in:
Olivier Dony 2014-06-02 18:57:26 +02:00
parent 0a537dae91
commit 1e9b41e2a4
1 changed files with 3 additions and 2 deletions

View File

@ -276,7 +276,8 @@ class procurement_order(osv.osv):
@param cr: The current row, from the database cursor,
@param uid: The current user ID for security checks
@param ids: List of selected IDs
@param use_new_cursor: False or the dbname
@param use_new_cursor: if set, use a dedicated cursor and auto-commit after processing each procurement.
This is appropriate for batch jobs only.
@param context: A standard dictionary for contextual values
@return: Dictionary of values
'''
@ -284,7 +285,7 @@ class procurement_order(osv.osv):
context = {}
try:
if use_new_cursor:
cr = openerp.registry(use_new_cursor).cursor()
cr = openerp.registry(cr.dbname).cursor()
# Run confirmed procurements
while True: