From c21319a127d911ff89c375ffb3629209310d0905 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Tue, 29 Oct 2024 14:28:24 +0800 Subject: [PATCH] =?UTF-8?q?rfid=E6=89=8B=E5=8A=A8=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 4 ++++ sf_manufacturing/security/group_security.xml | 10 +++++++--- sf_manufacturing/views/mrp_workorder_view.xml | 13 +++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) 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 @@ + + + + +
+
+