初次提交,智能工厂基础数据
This commit is contained in:
54
sf_base/models/sf_common.py
Normal file
54
sf_base/models/sf_common.py
Normal file
@@ -0,0 +1,54 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import logging
|
||||
from odoo import fields, models, api
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# 材料
|
||||
class MrsProductionMaterials(models.Model):
|
||||
_name = 'mrs.production.materials'
|
||||
_description = '材料'
|
||||
remark = fields.Text("备注")
|
||||
name = fields.Char('名称')
|
||||
partner_ids = fields.Many2many('res.partner', 'materials_ids', '加工工厂')
|
||||
materials_model_ids = fields.One2many('mrs.materials.model', 'materials_id', '材料型号')
|
||||
materials_no = fields.Char("编码")
|
||||
|
||||
|
||||
# 材料型号
|
||||
class MrsMaterialModel(models.Model):
|
||||
_name = 'mrs.materials.model'
|
||||
_description = '材料型号'
|
||||
remark = fields.Text("备注")
|
||||
name = fields.Char('型号名')
|
||||
need_h = fields.Boolean("需要热处理", default="false")
|
||||
mf_materia_post = fields.Char("热处理后硬度")
|
||||
density = fields.Float("密度(kg/m³)")
|
||||
materials_id = fields.Many2one('mrs.production.materials', "材料名")
|
||||
materials_num = fields.Char("编码号")
|
||||
material_no = fields.Char("编码")
|
||||
|
||||
|
||||
# 工艺 编码,名称,备注
|
||||
class MrsProductionProcess(models.Model):
|
||||
_name = 'mrs.production.process'
|
||||
_description = '表面工艺'
|
||||
name = fields.Char('表面工艺')
|
||||
remark = fields.Text("备注")
|
||||
processing_technology_ids = fields.Many2many('mrs.processing.technology', 'mrs_associated_processes',
|
||||
index=True)
|
||||
partner_process_ids = fields.Many2many('res.partner', 'process_ids', '加工工厂')
|
||||
process_encode = fields.Char("编码")
|
||||
|
||||
|
||||
class MrsProcessingTechnology(models.Model):
|
||||
_name = 'mrs.processing.technology'
|
||||
_description = '加工工艺'
|
||||
remark = fields.Text("备注")
|
||||
sequence = fields.Integer('Sequence', index=True)
|
||||
name = fields.Char('加工工艺', index=True)
|
||||
remark = fields.Text('备注', index=True)
|
||||
process_encode = fields.Char("编码")
|
||||
production_process_ids = fields.Many2many('mrs.production.process', 'mrs_associated_processes',
|
||||
index=True)
|
||||
Reference in New Issue
Block a user