工单优化
This commit is contained in:
@@ -9,23 +9,10 @@ class ResWorkcenter(models.Model):
|
||||
|
||||
users_ids = fields.Many2many("res.users", 'users_workcenter')
|
||||
|
||||
# @api.onchange('machine_tool_id')
|
||||
# def get_machine_tool_is_binding(self):
|
||||
# print('1111111')
|
||||
# for item in self:
|
||||
# item.machine_tool_id.is_binding = False
|
||||
|
||||
|
||||
equipment_ids = fields.One2many(
|
||||
'maintenance.equipment', 'workcenter_id', string="Maintenance Equipment",
|
||||
check_company=True)
|
||||
|
||||
@api.onchange('machine_tool_id')
|
||||
def update_machine_tool_is_binding(self):
|
||||
self.machine_tool_id.is_binding = True
|
||||
|
||||
|
||||
|
||||
def action_work_order(self):
|
||||
if not self.env.context.get('desktop_list_view', False):
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("sf_manufacturing.mrp_workorder_action_tablet")
|
||||
|
||||
Reference in New Issue
Block a user