From 085cfd6b59edf4bc2bfad5e6fa587e42f17e4fff Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 24 Oct 2013 10:19:01 +0200 Subject: [PATCH] [FIX] stock: on write of the reception method of a warehouse, recreate the pull rules of reception route in MTO always bzr revid: qdp-launchpad@openerp.com-20131024081901-r53dvxu2xnsz4mp8 --- addons/stock/stock.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index f909c2138ff..3f77051e7f1 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2495,7 +2495,7 @@ class stock_warehouse(osv.osv): for push_rule in push_rules_list: push_obj.create(cr, uid, vals=push_rule, context=context) for pull_rule in pull_rules_list: - #all pull rules in reception route are mto, because we don't won't to wait for the scheduler to trigger an orderpoint on input location + #all pull rules in reception route are mto, because we don't want to wait for the scheduler to trigger an orderpoint on input location pull_rule['procure_method'] = 'make_to_order' pull_obj.create(cr, uid, vals=pull_rule, context=context) @@ -2574,6 +2574,8 @@ class stock_warehouse(osv.osv): for push_rule in push_rules_list: push_obj.create(cr, uid, vals=push_rule, context=context) for pull_rule in pull_rules_list: + #all pull rules in reception route are mto, because we don't want to wait for the scheduler to trigger an orderpoint on input location + pull_rule['procure_method'] = 'make_to_order' pull_obj.create(cr, uid, vals=pull_rule, context=context) route_obj.write(cr, uid, warehouse.crossdock_route_id.id, {'active': new_reception_step != 'one_step' and new_delivery_step != 'ship_only'}, context=context)