同步系统化参数,同步每日数据
This commit is contained in:
@@ -3,26 +3,28 @@ import logging
|
||||
|
||||
from odoo import fields, models, api
|
||||
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MachineBrandTags(models.Model):
|
||||
_name = 'mrs.machine.brand.tags'
|
||||
_description = '标签'
|
||||
|
||||
brand_id = fields.Many2one('mrs.machine.brand', '品牌')
|
||||
name = fields.Char('名称', size=50)
|
||||
color = fields.Integer('颜色', default=0)
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
class MachineControlSystem(models.Model):
|
||||
_name = 'mrs.machine_tool.type.control_system'
|
||||
_description = '控制系统'
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称', size=50)
|
||||
name = fields.Char('名称', size=10)
|
||||
# type_id = fields.Many2one('mrs.machine_tool.type')
|
||||
brand_id = fields.Many2one('mrs.machine.brand', '品牌')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
# 品牌标签
|
||||
class MachineBrand(models.Model):
|
||||
_name = 'mrs.machine.brand'
|
||||
@@ -48,7 +50,7 @@ class MachineTool(models.Model):
|
||||
number_of_knife_library = fields.Integer('刀库数量')
|
||||
rotate_speed = fields.Integer('转速')
|
||||
number_of_axles = fields.Selection(
|
||||
[("3轴", "3轴"), ("4轴", "4轴"), ("5轴", "5轴")],
|
||||
[("三轴", "三轴"), ("四轴", "四轴"), ("五轴", "五轴")],
|
||||
default="", string="轴数")
|
||||
# 加工进程
|
||||
x_axis = fields.Integer('X轴')
|
||||
@@ -64,7 +66,7 @@ class MachineTool(models.Model):
|
||||
type_id = fields.Many2one('mrs.machine_tool.type', '型号',
|
||||
compute='_compute_type_id')
|
||||
brand_id = fields.Many2one('mrs.machine.brand', string='品牌')
|
||||
status = fields.Selection(
|
||||
state = fields.Selection(
|
||||
[("正常", "正常"), ("故障", "故障"), ("不可用", "不可用")],
|
||||
default="", string="状态")
|
||||
|
||||
@@ -136,7 +138,7 @@ class MachineToolType(models.Model):
|
||||
# 多个型号对应一个机床
|
||||
machine_tool_id = fields.Many2one('mrs.machine_tool', '机床')
|
||||
number_of_axles = fields.Selection(
|
||||
[("3轴", "3轴"), ("4轴", "4轴"), ("5轴", "5轴")],
|
||||
[("三轴", "三轴"), ("四轴", "四轴"), ("五轴", "五轴")],
|
||||
default="", string="轴数")
|
||||
# 加工进程
|
||||
x_axis = fields.Integer('X轴')
|
||||
|
||||
Reference in New Issue
Block a user