Merge branch 'feature/组装单重构_2' into feature/刀具拆解单优化

This commit is contained in:
yuxianghui
2024-09-13 17:38:19 +08:00
2 changed files with 16 additions and 18 deletions

View File

@@ -1505,29 +1505,26 @@ class FunctionalToolDismantle(models.Model):
'handle_code_id': self.handle_lot_id.id,
'handle_product_id': self.handle_product_id.id,
'loading_task_source': '3',
'use_tool_time': fields.Datetime.now() + timedelta(hours=4),
'reason_for_applying': '刀具寿命到期'
})
action = self.env.ref('sf_tool_management.sf_functional_tool_assembly_form')
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'title': '组装单创建完成',
'message': '请组装同名称的功能刀具',
'type': 'info',
'links': [{
'label': '组装单',
'url': f'#action={action.id}&id={assembly_id.id}&model=sf.functional.tool.assembly',
}],
},
'type': 'ir.actions.act_window',
'res_model': 'sf.functional.tool.assembly',
'view_type': 'form',
'view_mode': 'form',
'res_id': assembly_id.id,
# 'target': 'new'
}
# {
# 'type': 'ir.actions.act_window',
# 'res_model': 'sf.functional.tool.assembly',
# 'view_type': 'form',
# 'view_mode': 'form',
# 'res_id': assembly_id.id,
# 'type': 'ir.actions.client',
# 'tag': 'display_notification',
# 'params': {
# 'title': '组装单创建完成',
# 'message': '请组装同名称的功能刀具',
# 'type': 'info'
# }
# }
# 'params': {

View File

@@ -891,7 +891,8 @@
<group attrs="{'invisible': [('dismantle_cause', 'not in', ['寿命到期报废','崩刀报废'])]}">
<!-- <group col="3">-->
<group>
<field name="scrap_boolean" string="是否报废" readonly="0"/>
<field name="scrap_boolean" string="是否报废"
attrs="{'readonly': [('state' , '=', '已拆解')]}"/>
</group>
<!-- <group></group>-->
<!-- <group>-->