生成产品的BOM上的加工工序
This commit is contained in:
20
sf_base/models/process.py
Normal file
20
sf_base/models/process.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from odoo import fields, models, api
|
||||
|
||||
|
||||
class ModelType(models.Model):
|
||||
_name = 'sf.model.type'
|
||||
_description = '模型类型'
|
||||
|
||||
name = fields.Char('名称')
|
||||
routing_tmpl_id = fields.One2many('mrp.routing.workcenter', 'model_type_id', '工序模板')
|
||||
|
||||
|
||||
class ResMrpRoutingWorkcenter(models.Model):
|
||||
_inherit = 'mrp.routing.workcenter'
|
||||
|
||||
code = fields.Char('唯一编码')
|
||||
is_repeat = fields.Boolean('重复', default=False)
|
||||
workcenter_id = fields.Many2many('mrp.workcenter', required=False)
|
||||
bom_id = fields.Many2one('mrp.bom', required=False)
|
||||
sort = fields.Integer('排序')
|
||||
model_type_id = fields.Many2one('sf.model.type')
|
||||
Reference in New Issue
Block a user