23 lines
757 B
Python
23 lines
757 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import fields, models
|
|
|
|
|
|
class sf_technology_design(models.Model):
|
|
_name = 'sf.technology.design'
|
|
_description = "工艺设计"
|
|
|
|
name = fields.Char('工序')
|
|
panel = fields.Char('加工面')
|
|
sequence = fields.Integer('序号')
|
|
time_cycle_manual = fields.Float('预计时长')
|
|
production_id = fields.Many2one('mrp.production')
|
|
active = fields.Boolean('有效', default=True)
|
|
|
|
def json_technology_design_str(self, k, route):
|
|
workorders_values_str = [0, '', {
|
|
'name': route.route_workcenter_id.name,
|
|
'panel': k,
|
|
'sequence': False,
|
|
'time_cycle_manual':route.route_workcenter_id.time_cycle_manual }]
|
|
return workorders_values_str
|