From 07c7ed6dba2c99c32f4844b060ca148c33093670 Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Wed, 12 Jun 2024 14:20:15 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BC=98=E5=8C=96=E7=BB=84=E8=A3=85?= =?UTF-8?q?=E6=97=B6=E9=87=8D=E5=A4=8D=E9=80=89=E5=8F=96=E8=B4=A7=E4=BD=8D?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=89=B9=E6=AC=A1=E5=8F=B7=E6=B6=88=E5=A4=B1?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/wizard/wizard.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sf_tool_management/wizard/wizard.py b/sf_tool_management/wizard/wizard.py index f0a67482..40dbcc52 100644 --- a/sf_tool_management/wizard/wizard.py +++ b/sf_tool_management/wizard/wizard.py @@ -246,6 +246,11 @@ class FunctionalToolAssemblyOrder(models.TransientModel): sf_tool_brand_id_1 = fields.Many2one('sf.machine.brand', string='整体式刀具品牌', related='integral_product_id.brand_id') + @api.onchange('integral_freight_barcode_id') + def _onchange_integral_freight_barcode_id(self): + for item in self: + item.integral_freight_lot_id = False + @api.depends('integral_freight_lot_id') def _compute_integral_product_id(self): if self.integral_freight_lot_id: @@ -266,6 +271,11 @@ class FunctionalToolAssemblyOrder(models.TransientModel): related='blade_product_id.specification_id') sf_tool_brand_id_2 = fields.Many2one('sf.machine.brand', '刀片品牌', related='blade_product_id.brand_id') + @api.onchange('blade_freight_barcode_id') + def _onchange_blade_freight_barcode_id(self): + for item in self: + item.blade_freight_lot_id = False + @api.depends('blade_freight_lot_id') def _compute_blade_product_id(self): if self.blade_freight_lot_id: @@ -286,6 +296,11 @@ class FunctionalToolAssemblyOrder(models.TransientModel): related='bar_product_id.specification_id') sf_tool_brand_id_3 = fields.Many2one('sf.machine.brand', '刀杆品牌', related='bar_product_id.brand_id') + @api.onchange('bar_freight_barcode_id') + def _onchange_bar_freight_barcode_id(self): + for item in self: + item.bar_freight_lot_id = False + @api.depends('bar_freight_lot_id') def _compute_bar_product_id(self): if self.bar_freight_lot_id: @@ -306,6 +321,11 @@ class FunctionalToolAssemblyOrder(models.TransientModel): related='pad_product_id.specification_id') sf_tool_brand_id_4 = fields.Many2one('sf.machine.brand', '刀盘品牌', related='pad_product_id.brand_id') + @api.onchange('pad_freight_barcode_id') + def _onchange_pad_freight_barcode_id(self): + for item in self: + item.pad_freight_lot_id = False + @api.depends('pad_freight_lot_id') def _compute_pad_product_id(self): if self.pad_freight_lot_id: @@ -346,6 +366,11 @@ class FunctionalToolAssemblyOrder(models.TransientModel): related='chuck_product_id.specification_id') sf_tool_brand_id_6 = fields.Many2one('sf.machine.brand', '夹头品牌', related='chuck_product_id.brand_id') + @api.onchange('chuck_freight_barcode_id') + def _onchange_chuck_freight_barcode_id(self): + for item in self: + item.chuck_freight_lot_id = False + @api.depends('chuck_freight_lot_id') def _compute_chuck_product_id(self): if self.chuck_freight_lot_id: