diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py
index a03841a3b1b..67a4a60d03d 100644
--- a/addons/mrp/models/mrp_production.py
+++ b/addons/mrp/models/mrp_production.py
@@ -56,6 +56,7 @@ class MrpProduction(models.Model):
'Reference', copy=False, readonly=True, default=lambda x: _('New'))
origin = fields.Char(
'Source', copy=False,
+ states={'done': [('readonly', True)], 'cancel': [('readonly', True)]},
help="Reference of the document that generated this production order request.")
product_id = fields.Many2one(
@@ -191,6 +192,7 @@ class MrpProduction(models.Model):
help='Technical field to check when we can post')
user_id = fields.Many2one(
'res.users', 'Responsible', default=lambda self: self.env.user,
+ states={'done': [('readonly', True)], 'cancel': [('readonly', True)]},
domain=lambda self: [('groups_id', 'in', self.env.ref('mrp.group_mrp_user').id)])
company_id = fields.Many2one(
'res.company', 'Company', default=lambda self: self.env.company,
diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml
index 45e378810db..17eb2362377 100644
--- a/addons/mrp/views/mrp_production_views.xml
+++ b/addons/mrp/views/mrp_production_views.xml
@@ -6,20 +6,24 @@
mrp.production.tree
mrp.production
-
+
-
-
+
+
-
+
-
+
-
+