优化工艺确认
This commit is contained in:
@@ -6,22 +6,23 @@ class sf_technology_design(models.Model):
|
||||
_name = 'sf.technology.design'
|
||||
_description = "工艺设计"
|
||||
|
||||
name = fields.Char('工序')
|
||||
route_id = fields.Many2one('mrp.routing.workcenter', '工序')
|
||||
panel = fields.Char('加工面')
|
||||
sequence = fields.Integer('序号')
|
||||
time_cycle_manual = fields.Float('预计时长')
|
||||
routing_tag = fields.Selection(related='route_id.routing_tag', string='标签', store=True)
|
||||
time_cycle_manual = fields.Float(related='route_id.time_cycle_manual', string='预计时长')
|
||||
production_id = fields.Many2one('mrp.production')
|
||||
is_auto = fields.Boolean('是否自动生成', default=False)
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
def json_technology_design_str(self, k, route_name, time_cycle_manual, i):
|
||||
def json_technology_design_str(self, k, route, i):
|
||||
workorders_values_str = [0, '', {
|
||||
'name': route_name,
|
||||
'route_id': route.id,
|
||||
'panel': k,
|
||||
'sequence': i,
|
||||
'is_auto': True,
|
||||
'time_cycle_manual': time_cycle_manual}]
|
||||
'is_auto': True}]
|
||||
return workorders_values_str
|
||||
|
||||
def unlink_technology_design(self):
|
||||
self.active = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user