根据工序生成工单
This commit is contained in:
@@ -6,9 +6,10 @@ class sf_technology_design(models.Model):
|
||||
_name = 'sf.technology.design'
|
||||
_description = "工艺设计"
|
||||
|
||||
route_id = fields.Many2one('mrp.routing.workcenter', '工序')
|
||||
panel = fields.Char('加工面')
|
||||
sequence = fields.Integer('序号')
|
||||
route_id = fields.Many2one('mrp.routing.workcenter', '工序')
|
||||
process_parameters_id = fields.Many2one('sf.production.process.parameter', string='表面工艺参数')
|
||||
panel = fields.Char('加工面')
|
||||
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')
|
||||
@@ -19,10 +20,12 @@ class sf_technology_design(models.Model):
|
||||
workorders_values_str = [0, '', {
|
||||
'route_id': route.id,
|
||||
'panel': k,
|
||||
'process_parameters_id': False if route.routing_type.id != '表面工艺' else self.env[
|
||||
'sf.production.process.parameter'].search(
|
||||
[('process_id', '=', route.surface_technics_id.id)]).id,
|
||||
'sequence': i,
|
||||
'is_auto': True}]
|
||||
return workorders_values_str
|
||||
|
||||
def unlink_technology_design(self):
|
||||
self.active = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user