diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 27cb2d09583..da8a9e4b99c 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -511,8 +511,8 @@ class mrp_production(osv.osv):
help="Bill of Materials allow you to define the list of required raw materials to make a finished product."),
'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft':[('readonly',False)]},
help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."),
- 'picking_id': fields.many2one('stock.picking', 'Picking List', readonly=True, ondelete="restrict",
- help="This is the Internal Picking List that brings the finished product to the production plan"),
+# 'picking_id': fields.many2one('stock.picking', 'Picking List', readonly=True, ondelete="restrict",
+# help="This is the Internal Picking List that brings the finished product to the production plan"),
'move_prod_id': fields.many2one('stock.move', 'Product Move', readonly=True),
'move_lines': fields.one2many('stock.move', 'raw_material_production_id', 'Products to Consume',
domain=[('state','not in', ('done', 'cancel'))], readonly=True, states={'draft':[('readonly',False)]}),
@@ -717,10 +717,10 @@ class mrp_production(osv.osv):
context = {}
move_obj = self.pool.get('stock.move')
for production in self.browse(cr, uid, ids, context=context):
- if production.state == 'confirmed' and production.picking_id.state not in ('draft', 'cancel'):
- raise osv.except_osv(
- _('Cannot cancel manufacturing order!'),
- _('You must first cancel related internal picking attached to this manufacturing order.'))
+ if production.state == 'confirmed': #and production.picking_id.state not in ('draft', 'cancel'):
+ raise osv.except_osv(
+ _('Cannot cancel manufacturing order!'),
+ _('You must first cancel related internal picking attached to this manufacturing order.'))
if production.move_created_ids:
move_obj.action_cancel(cr, uid, [x.id for x in production.move_created_ids])
move_obj.action_cancel(cr, uid, [x.id for x in production.move_lines])
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index e1ea16cdec9..010e9077bc6 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -788,8 +788,7 @@
-
-
+
diff --git a/addons/mrp/test/cancel_order.yml b/addons/mrp/test/cancel_order.yml
index 2f721b6c653..17905906e3b 100644
--- a/addons/mrp/test/cancel_order.yml
+++ b/addons/mrp/test/cancel_order.yml
@@ -7,12 +7,6 @@
I first confirm order for PC Assemble SC349.
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_test1}
--
- In order to cancel the production order, I first cancel its picking.
--
- !function {model: stock.picking, name: action_cancel}:
- - model: mrp.production
- eval: "[obj(ref('mrp_production_test1')).picking_id.id]"
-
Now I cancel the production order.
-
diff --git a/addons/mrp/tests/test_multicompany.py b/addons/mrp/tests/test_multicompany.py
index f38a31a70de..5d1a0a50bcb 100644
--- a/addons/mrp/tests/test_multicompany.py
+++ b/addons/mrp/tests/test_multicompany.py
@@ -47,8 +47,7 @@ class TestMrpMulticompany(common.TransactionCase):
cr, uid, context = self.cr, self.multicompany_user_id, {}
fields = ['location_src_id', 'location_dest_id']
defaults = self.stock_location.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context)
- for field in fields:
- print field, uid, defaults
+ for field in fields:
if defaults.get(field):
try:
self.stock_location.check_access_rule(cr, uid, [defaults[field]], 'read', context)