[FIX] procurement: restore fixes for background procurement from rev.9b6f5dc, accidentally reverted by v8 WMS branch
Probably forgotten during a sync with master, as the fixes belong to a different file now. This is the second part of the fix in previous commit.
This commit is contained in:
parent
1e9b41e2a4
commit
d9ff7c4efc
|
@ -271,7 +271,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
|
||||
'''
|
||||
|
@ -280,7 +281,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()
|
||||
|
||||
move_obj = self.pool.get('stock.move')
|
||||
|
||||
|
@ -333,15 +334,14 @@ class procurement_order(osv.osv):
|
|||
def _procure_orderpoint_confirm(self, cr, uid, use_new_cursor=False, company_id=False, context=None):
|
||||
'''
|
||||
Create procurement based on Orderpoint
|
||||
use_new_cursor: False or the dbname
|
||||
|
||||
@return: Dictionary of values
|
||||
"""
|
||||
:param bool use_new_cursor: if set, use a dedicated cursor and auto-commit after processing each procurement.
|
||||
This is appropriate for batch jobs only.
|
||||
'''
|
||||
if context is None:
|
||||
context = {}
|
||||
if use_new_cursor:
|
||||
cr = openerp.registry(use_new_cursor).db.cursor()
|
||||
cr = openerp.registry(cr.dbname).db.cursor()
|
||||
orderpoint_obj = self.pool.get('stock.warehouse.orderpoint')
|
||||
|
||||
procurement_obj = self.pool.get('procurement.order')
|
||||
|
|
Loading…
Reference in New Issue