新增返工向导
This commit is contained in:
@@ -200,8 +200,8 @@ class ResMrpWorkOrder(models.Model):
|
||||
is_remanufacture = fields.Boolean(string='重新生成制造订单', default=False)
|
||||
is_fetchcnc = fields.Boolean(string='重新获取NC程序', default=False)
|
||||
reason = fields.Selection(
|
||||
[("programming", "编程"), ("clamping", "返工"), ("cutter", "刀具"), ("operate computer", "操机"),
|
||||
("technology", "工艺"), ("customer redrawing", "客户改图"), ("other", "其他"), ], string="原因", tracking=True)
|
||||
[("programming", "编程"), ("cutter", "刀具"), ("operate computer", "操机"),
|
||||
("technology", "工艺"), ("customer redrawing", "客户改图")], string="原因", tracking=True)
|
||||
detailed_reason = fields.Text('详细原因')
|
||||
|
||||
# is_send_program_again = fields.Boolean(string='是否重新下发NC程序', default=False)
|
||||
@@ -460,6 +460,21 @@ class ResMrpWorkOrder(models.Model):
|
||||
else:
|
||||
raise UserError(_("该工单暂未完成,无法进行工件配送"))
|
||||
|
||||
def button_rework_pre(self):
|
||||
# production_ids |= self.production_id
|
||||
return {
|
||||
'name': _('返工'),
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'sf.rework.wizard',
|
||||
'target': 'new',
|
||||
'context': {
|
||||
'default_workorder_id': self.id,
|
||||
'default_production_ids': [(6, 0, [self.production_id.id])],
|
||||
}}
|
||||
|
||||
|
||||
|
||||
# 拼接工单对象属性值
|
||||
def json_workorder_str(self, k, production, route, item):
|
||||
# 计算预计时长duration_expected
|
||||
|
||||
Reference in New Issue
Block a user