1、优化组装时重复选取货位时,批次号消失的问题

This commit is contained in:
yuxianghui
2024-06-12 14:20:15 +08:00
parent 42cded8c64
commit 07c7ed6dba

View File

@@ -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: