1、优化刀具物料接口、优化功能刀具安全库存接口、优化功能刀具预警接口;2、优化功能刀具组装流程;3、优化刀具物料序列号同步步骤;
This commit is contained in:
@@ -98,7 +98,7 @@ class StockLot(models.Model):
|
||||
|
||||
tool_material_search_id = fields.Many2one('sf.tool.material.search', string='刀具物料搜索')
|
||||
tool_material_status = fields.Selection([('可用', '可用'), ('在用', '在用'), ('报废', '报废')], string='状态',
|
||||
compute='_compute_tool_material_status')
|
||||
compute='_compute_tool_material_status', store=True)
|
||||
|
||||
@api.depends('quant_ids')
|
||||
def _compute_tool_material_status(self):
|
||||
@@ -109,8 +109,13 @@ class StockLot(models.Model):
|
||||
record.tool_material_status = '在用'
|
||||
else:
|
||||
record.tool_material_status = '可用'
|
||||
# 注册刀具物料状态到cloud平台
|
||||
record.enroll_tool_material_stock()
|
||||
|
||||
@api.onchange('tool_material_status')
|
||||
def _onchange_tool_material_status(self):
|
||||
for obj in self:
|
||||
if obj:
|
||||
# 注册刀具物料状态到cloud平台
|
||||
obj.enroll_tool_material_stock()
|
||||
|
||||
@api.model
|
||||
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
||||
|
||||
Reference in New Issue
Block a user