优化了功能刀具组装的出库弹窗里的确定、取消按键的显示,新增CAM装刀来源的任务出库后修改CAM用刀计划的状态改变为已完成

This commit is contained in:
yuxianghui
2023-06-29 15:56:08 +08:00
parent d5938bf407
commit 69cb1adc3e
3 changed files with 20 additions and 6 deletions

View File

@@ -250,3 +250,16 @@ class DeliveryOfCargoFromStorage(models.TransientModel):
'receive_person': self.env.user.name,
'receive_time': fields.Datetime.now()
})
tool_assembly = self.env['sf.functional.tool.assembly'].search([
('functional_tool_code', '=', val.functional_tool_code),
('functional_tool_name', '=', val.functional_tool_name)
])
# 判断装刀任务来源如果来源于CAM装刀则修改CAM装刀的计划执行状态
if tool_assembly.loading_task_source == '0':
self.env['sf.cam.work.order.program.knife.plan'].search([
('functional_tool_code', '=', val.functional_tool_code),
('functional_tool_name', '=', val.functional_tool_name)
]).write({
'plan_execute_status': '2'
})

View File

@@ -281,11 +281,12 @@
<field name="machine_tool_code"/>
<field name="receive_person"/>
<field name="receive_time"/>
<button string="确定" name="stock_removal" type="object" class="btn-primary" />
<button string="取消" class="btn-secondary" special="cancel"/>
</tree>
<footer>
<button string="确定" name="stock_removal" type="object" class="btn-primary" />
<button string="取消" class="btn-secondary" special="cancel"/>
</footer>
</field>
</record>