diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py
index 01977926..9c6b2a5c 100644
--- a/sf_manufacturing/models/mrp_workorder.py
+++ b/sf_manufacturing/models/mrp_workorder.py
@@ -305,6 +305,7 @@ class ResMrpWorkOrder(models.Model):
is_delivery = fields.Boolean('是否配送完成', default=False)
rfid_code = fields.Char('RFID码')
rfid_code_old = fields.Char('RFID码(已解除)')
+ is_test_env = fields.Boolean('测试环境', default=False)
production_line_id = fields.Many2one('sf.production.line', related='production_id.production_line_id',
string='生产线', store=True, tracking=True)
@@ -320,6 +321,9 @@ class ResMrpWorkOrder(models.Model):
detailed_reason = fields.Text('详细原因')
is_rework = fields.Boolean(string='是否返工', default=False)
+ def button_change_env(self):
+ self.is_test_env = not self.is_test_env
+
@api.constrains('blocked_by_workorder_ids')
def _check_no_cyclic_dependencies(self):
if self.production_id.state not in ['rework'] and self.state not in ['rework']:
diff --git a/sf_manufacturing/security/group_security.xml b/sf_manufacturing/security/group_security.xml
index fdbc3ae5..040e7b92 100644
--- a/sf_manufacturing/security/group_security.xml
+++ b/sf_manufacturing/security/group_security.xml
@@ -1,5 +1,9 @@
-
-
+
+
+ 演示模式
+
+
-
\ No newline at end of file
+
+
diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml
index 708a9779..143ac4ab 100644
--- a/sf_manufacturing/views/mrp_workorder_view.xml
+++ b/sf_manufacturing/views/mrp_workorder_view.xml
@@ -247,11 +247,24 @@
+
+
+
+
+
+
+
+