[FIX] purchase: when modifying the reception mode of a warehouse, reconfigure the buy rule as well
bzr revid: qdp-launchpad@openerp.com-20131023140740-1z9g31g7k2j6nt5k
This commit is contained in:
parent
45c990e833
commit
4726c419f1
|
@ -147,3 +147,9 @@ class stock_warehouse(osv.osv):
|
|||
res.remove(product_id)
|
||||
break
|
||||
return res
|
||||
|
||||
def change_route(self, cr, uid, ids, warehouse, new_reception_step=False, new_delivery_step=False, context=None):
|
||||
res = super(stock_warehouse, self).change_route(cr, uid, ids, warehouse, new_reception_step=new_reception_step, new_delivery_step=new_delivery_step, context=context)
|
||||
if warehouse.wh_input_stock_loc_id != warehouse.buy_pull_rule_id.id.location_id:
|
||||
self.pool.get('procurement.rule').write(cr, uid, warehouse.buy_pull_rule_id.id, {'location_id': warehouse.wh_input_stock_loc_id.id}, context=context)
|
||||
return res
|
||||
|
|
Loading…
Reference in New Issue