From d1febb7b8e908f8de947e646c9562b09ef6d9cc9 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Tue, 27 Aug 2013 17:25:28 +0200 Subject: [PATCH] [FIX]push/pull rules, picking type should be required except for pull rule with type manufacture bzr revid: csn@openerp.com-20130827152528-wm5m8zynlzjjfor9 --- addons/stock/procurement.py | 2 +- addons/stock/stock_view.xml | 33 ++++++++++++++++++- addons/stock_location/stock_location.py | 2 +- addons/stock_location/stock_location_view.xml | 20 +++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) diff --git a/addons/stock/procurement.py b/addons/stock/procurement.py index 7f36871b9d1..392e65d1c91 100644 --- a/addons/stock/procurement.py +++ b/addons/stock/procurement.py @@ -40,7 +40,7 @@ class procurement_rule(osv.osv): 'location_id': fields.many2one('stock.location', 'Destination Location'), 'location_src_id': fields.many2one('stock.location', 'Source Location', help="Source location is action=move"), - 'picking_type_id': fields.many2one('stock.picking.type', 'Picking Type', required=True, + 'picking_type_id': fields.many2one('stock.picking.type', 'Picking Type', help="Picking Type determines the way the picking should be shown in the view, reports, ...") } diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index af3fa1153f4..e76ce99855c 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1451,10 +1451,41 @@ - + + + + + stock.procurement.form + procurement.rule + + + +
+ +
+

+

+
+ + + + + + + + + + + +
+
+
+
diff --git a/addons/stock_location/stock_location.py b/addons/stock_location/stock_location.py index 8a389721733..5e58b918cb6 100644 --- a/addons/stock_location/stock_location.py +++ b/addons/stock_location/stock_location.py @@ -60,7 +60,7 @@ class stock_location_path(osv.osv): ("2binvoiced", "To Be Invoiced"), ("none", "Not Applicable")], "Invoice Status", required=True,), - 'picking_type_id': fields.many2one('stock.picking.type', 'Picking Type', help="This is the picking type associated with the different pickings"), + 'picking_type_id': fields.many2one('stock.picking.type', 'Picking Type', required=True, help="This is the picking type associated with the different pickings"), 'auto': fields.selection( [('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')], 'Automatic Move', diff --git a/addons/stock_location/stock_location_view.xml b/addons/stock_location/stock_location_view.xml index 8a42f2afb46..4846ac70644 100644 --- a/addons/stock_location/stock_location_view.xml +++ b/addons/stock_location/stock_location_view.xml @@ -2,6 +2,26 @@ + + stock.procurement.rule.inherit.form + procurement.rule + + + + + + + + + + + + + + + + + stock.location.form