From 4ee4b28389149cedb6d7930cc639d516d88afd39 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Fri, 26 Jan 2024 14:18:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/models/common.py | 2 +- sf_machine_connect/views/machine_monitor.xml | 4 ++-- sf_mrs_connect/models/sync_common.py | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sf_base/models/common.py b/sf_base/models/common.py index 7450fff9..6cddafd7 100644 --- a/sf_base/models/common.py +++ b/sf_base/models/common.py @@ -61,7 +61,7 @@ class MrsMaterialModel(models.Model): supplier_ids = fields.One2many('sf.supplier.sort', 'materials_model_id', string='供应商') active = fields.Boolean('有效', default=True) - @api.constrains('gain_way', 'supplier_ids') + @api.constrains('supplier_ids') def _check_gain_way(self): if not self.gain_way: raise UserError("请输入获取方式") diff --git a/sf_machine_connect/views/machine_monitor.xml b/sf_machine_connect/views/machine_monitor.xml index 9c9a21a3..d52bead8 100644 --- a/sf_machine_connect/views/machine_monitor.xml +++ b/sf_machine_connect/views/machine_monitor.xml @@ -10,7 +10,7 @@ - + @@ -143,7 +143,7 @@ - + --> diff --git a/sf_mrs_connect/models/sync_common.py b/sf_mrs_connect/models/sync_common.py index df9437ba..1ca9affa 100644 --- a/sf_mrs_connect/models/sync_common.py +++ b/sf_mrs_connect/models/sync_common.py @@ -314,12 +314,12 @@ class sfProductionProcess(models.Model): brand = self.env['sf.production.process'].search( [("code", '=', item['code'])]) if brand: - brand.name = item['name'], + brand.name = item['name'] brand.category_id = self.env['sf.production.process.category'].search( - [("code", '=', item['category_code'])]).id, - brand.code = item['code'], - brand.remark = item['remark'], - brand.active = item['active'], + [("code", '=', item['category_code'])]).id + brand.code = item['code'] + brand.remark = item['remark'] + brand.active = item['active'] brand.remark = item['remark'] production_process = self.search([("code", '=', item['code'])]) category = self.env['sf.production.process.category'].search(