1、优化工单扫描绑定托盘的验证条件,只有在工单已完成时不能再扫描绑定托盘;2、优化中控的刀具组接口,改为传输功能刀具清单的刀具组数据;3、优化功能刀具组装单模型的刀柄信息,删除刀柄货位字段,添加刀柄Rfid字段,根据货位带出刀柄信息改为根据序列号带出;5、优化功能刀具组装单弹窗,删除刀柄货位字段添加刀柄Rfid字段,删除刀柄的扫货位录入信息的代码;夹头货位改为非必填;添加组装后刀具组字段,添加根据所选的功能刀具名称,自动带出功能刀具的类型、刀具组、直径、刀尖R角、最大寿命值、总长度、伸出长、避空长信息,且可修改;6、优化调整功能刀具组装单弹窗的布局;
This commit is contained in:
@@ -473,26 +473,25 @@ class FunctionalToolAssembly(models.Model):
|
||||
item.pad_product_id = False
|
||||
|
||||
# ==============刀柄型号==============
|
||||
handle_freight_barcode = fields.Char('刀柄货位')
|
||||
handle_code_id = fields.Many2one('stock.lot', '刀柄序列号', compute='_compute_handle_product_id', store=True)
|
||||
handle_freight_rfid = fields.Char('刀柄Rfid', compute='_compute_handle_product_id', store=True)
|
||||
handle_code_id = fields.Many2one('stock.lot', '刀柄序列号')
|
||||
handle_product_id = fields.Many2one('product.product', string='刀柄名称', compute='_compute_handle_product_id',
|
||||
store=True)
|
||||
cutting_tool_cutterhandle_model_id = fields.Many2one('sf.cutting_tool.standard.library', string='刀柄型号',
|
||||
related='handle_code_id.product_id.cutting_tool_model_id')
|
||||
related='handle_product_id.cutting_tool_model_id')
|
||||
handle_specification_id = fields.Many2one('sf.tool.materials.basic.parameters', string='刀柄规格',
|
||||
related='handle_code_id.product_id.specification_id')
|
||||
sf_tool_brand_id_5 = fields.Many2one('sf.machine.brand', '刀柄品牌', related='handle_code_id.product_id.brand_id')
|
||||
related='handle_product_id.specification_id')
|
||||
sf_tool_brand_id_5 = fields.Many2one('sf.machine.brand', '刀柄品牌', related='handle_product_id.brand_id')
|
||||
|
||||
@api.depends('handle_freight_barcode')
|
||||
@api.depends('handle_code_id')
|
||||
def _compute_handle_product_id(self):
|
||||
for item in self:
|
||||
location = self.env['sf.shelf.location'].sudo().search([('barcode', '=', item.handle_freight_barcode)])
|
||||
if location:
|
||||
item.handle_code_id = location.product_sn_id.id
|
||||
item.handle_product_id = location.product_id.id
|
||||
if item.handle_code_id:
|
||||
item.handle_product_id = item.handle_code_id.product_id.id
|
||||
item.handle_freight_rfid = item.handle_code_id.rfid
|
||||
else:
|
||||
item.handle_code_id = False
|
||||
item.handle_product_id = False
|
||||
item.handle_freight_rfid = False
|
||||
|
||||
# ==============夹头型号==============
|
||||
chuck_freight_barcode = fields.Char('夹头货位')
|
||||
|
||||
Reference in New Issue
Block a user