1、解决 刀具组装选择的批次号队友物料只剩下1个时-组装完该单据详情不显示批次信息 的bug;2、调整拆解单界面布局

This commit is contained in:
yuxianghui
2024-06-12 16:28:42 +08:00
parent 07c7ed6dba
commit 0ad7e72b15
3 changed files with 38 additions and 50 deletions

View File

@@ -427,11 +427,11 @@ class FunctionalToolAssembly(models.Model):
sf_tool_brand_id_1 = fields.Many2one('sf.machine.brand', string='整体式刀具品牌',
related='integral_product_id.brand_id')
@api.depends('integral_freight_barcode_id')
@api.depends('integral_lot_id')
def _compute_integral_product_id(self):
for item in self:
if item.integral_freight_barcode_id:
item.integral_product_id = item.integral_freight_barcode_id.product_id.id
if item.integral_lot_id:
item.integral_product_id = item.integral_lot_id.product_id.id
# =================刀片型号=============
blade_freight_barcode_id = fields.Many2one('sf.shelf.location', string='刀片货位')
@@ -444,11 +444,11 @@ class FunctionalToolAssembly(models.Model):
related='blade_product_id.specification_id')
sf_tool_brand_id_2 = fields.Many2one('sf.machine.brand', '刀片品牌', related='blade_product_id.brand_id')
@api.depends('blade_freight_barcode_id')
@api.depends('blade_lot_id')
def _compute_blade_product_id(self):
for item in self:
if item.blade_freight_barcode_id:
item.blade_product_id = item.blade_freight_barcode_id.product_id.id
if item.blade_lot_id:
item.blade_product_id = item.blade_lot_id.product_id.id
# ==============刀杆型号================
bar_freight_barcode_id = fields.Many2one('sf.shelf.location', string='刀杆货位')
@@ -461,11 +461,11 @@ class FunctionalToolAssembly(models.Model):
related='bar_product_id.specification_id')
sf_tool_brand_id_3 = fields.Many2one('sf.machine.brand', '刀杆品牌', related='bar_product_id.brand_id')
@api.depends('bar_freight_barcode_id')
@api.depends('bar_lot_id')
def _compute_bar_product_id(self):
for item in self:
if item.bar_freight_barcode_id:
item.bar_product_id = item.bar_freight_barcode_id.product_id.id
if item.bar_lot_id:
item.bar_product_id = item.bar_lot_id.product_id.id
# =============刀盘型号================
pad_freight_barcode_id = fields.Many2one('sf.shelf.location', string='刀盘货位')
@@ -478,11 +478,11 @@ class FunctionalToolAssembly(models.Model):
related='pad_product_id.specification_id')
sf_tool_brand_id_4 = fields.Many2one('sf.machine.brand', '刀盘品牌', related='pad_product_id.brand_id')
@api.depends('pad_freight_barcode_id')
@api.depends('pad_lot_id')
def _compute_pad_product_id(self):
for item in self:
if item.pad_freight_barcode_id:
item.pad_product_id = item.pad_freight_barcode_id.product_id.id
if item.pad_lot_id:
item.pad_product_id = item.pad_lot_id.product_id.id
# ==============刀柄型号==============
handle_freight_rfid = fields.Char('刀柄Rfid', compute='_compute_handle_product_id', store=True)
@@ -516,11 +516,11 @@ class FunctionalToolAssembly(models.Model):
related='chuck_product_id.specification_id')
sf_tool_brand_id_6 = fields.Many2one('sf.machine.brand', '夹头品牌', related='chuck_product_id.brand_id')
@api.depends('chuck_freight_barcode_id')
@api.depends('chuck_lot_id')
def _compute_chuck_product_id(self):
for item in self:
if item.chuck_freight_barcode_id:
item.chuck_product_id = item.chuck_freight_barcode_id.product_id.id
if item.chuck_lot_id:
item.chuck_product_id = item.chuck_lot_id.product_id.id
# ==================待删除字段==================
integral_freight_barcode = fields.Char('整体式刀具货位')