制造订单、工单页面导航优化
This commit is contained in:
@@ -40,6 +40,11 @@ class ResMrpWorkOrder(models.Model):
|
||||
# workcenter_id = fields.Many2one('mrp.workcenter', string='工作中心', required=False)
|
||||
users_ids = fields.Many2many("res.users", 'users_workorder', related="workcenter_id.users_ids")
|
||||
processing_panel = fields.Char('加工面')
|
||||
processing_panel_selection = fields.Selection([
|
||||
('ZM', 'ZM'),
|
||||
('FM', 'FM'),
|
||||
('YC', 'YC'),
|
||||
('QC', 'QC')], string="加工面", compute='_compute_processing_panel_selection', store=True)
|
||||
sequence = fields.Integer(string='工序')
|
||||
routing_type = fields.Selection([
|
||||
('装夹预调', '装夹预调'),
|
||||
@@ -63,6 +68,14 @@ class ResMrpWorkOrder(models.Model):
|
||||
delivery_warning = fields.Selection([('normal', '正常'), ('warning', '告警'), ('overdue', '逾期')], string='时效',
|
||||
tracking=True)
|
||||
|
||||
@api.depends('processing_panel')
|
||||
def _compute_processing_panel_selection(self):
|
||||
for record in self:
|
||||
if record.processing_panel in ['ZM', 'FM', 'YC', 'QC']:
|
||||
record.processing_panel_selection = record.processing_panel
|
||||
else:
|
||||
record.processing_panel_selection = False
|
||||
|
||||
@api.depends('production_id.manual_quotation')
|
||||
def _compute_manual_quotation(self):
|
||||
for item in self:
|
||||
|
||||
Reference in New Issue
Block a user