From dca6f9fb53cfb2c63fa7049e5fd62ab9483ace18 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Wed, 26 Feb 2025 09:40:18 +0800 Subject: [PATCH] =?UTF-8?q?sf-=E5=B7=A5=E5=8E=82=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E6=8E=A5=E5=8D=95-=E5=9D=AF=E6=96=99=E7=9A=84=E5=88=B6?= =?UTF-8?q?=E9=80=A0=E8=AE=A2=E5=8D=95=E6=9C=AA=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 4 ++-- .../views/mrp_production_addional_change.xml | 2 +- sf_manufacturing/wizard/sale_order_cancel.py | 19 +++++++++++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 007b2554..c4623d65 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -275,9 +275,9 @@ class MrpProduction(models.Model): @api.onchange('product_id') def onchange_product_id(self): for record in self: - if record.product_id.categ_id.type == '成品': + if record.product_id.categ_id.name == '成品': record.production_product_type = '成品' - elif record.product_id.categ_id.type == '坯料': + elif record.product_id.categ_id.name == '坯料': record.production_product_type = '坯料' else: record.production_product_type = '其他' diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml index 2d048153..06c2a7bd 100644 --- a/sf_manufacturing/views/mrp_production_addional_change.xml +++ b/sf_manufacturing/views/mrp_production_addional_change.xml @@ -116,7 +116,7 @@ - +