212
This commit is contained in:
@@ -1 +1,2 @@
|
||||
from . import models
|
||||
from . import commons
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
{
|
||||
'name': '机企猫藏智能工厂 基础模块',
|
||||
'name': '机企猫智能工厂 基础模块',
|
||||
'version': '1.0',
|
||||
'summary': '智能工厂基础模块',
|
||||
'sequence': 1,
|
||||
@@ -10,15 +10,13 @@
|
||||
""",
|
||||
'category': 'YZ',
|
||||
'website': 'https://www.sf.jikimo.com',
|
||||
'depends': ['account', 'base', 'mrp', 'sale'],
|
||||
'depends': ['account', 'base', 'mrp'],
|
||||
'data': [
|
||||
'security/group_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'views/mrs_base_view.xml',
|
||||
'views/mrs_common_view.xml',
|
||||
"views/menu_view.xml",
|
||||
'views/sale_order_view.xml',
|
||||
'views/product_template_view.xml',
|
||||
'views/base_view.xml',
|
||||
'views/common_view.xml',
|
||||
"views/menu_view.xml"
|
||||
|
||||
],
|
||||
'demo': [
|
||||
|
||||
@@ -1 +1 @@
|
||||
from. import common
|
||||
from. import common
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
<!--<?xml version="1.0" encoding="UTF-8" ?>-->
|
||||
<!--<odoo>-->
|
||||
<!-- <data noupdate="0">-->
|
||||
<!-- <record id="mrp_routing_workcenter_template_automatic_coding_sf" model="mrp.routing.workcenter">-->
|
||||
<!-- <field name="name">获取自动编码程序</field>-->
|
||||
<!-- <field name="code">automatic coding</field>-->
|
||||
<!-- <field name="time_mode">manual</field>-->
|
||||
<!-- <field name="time_cycle">60</field>-->
|
||||
<!-- <field name="active">True</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="mrp_routing_workcenter_template_clamping_sf" model="mrp.routing.workcenter">-->
|
||||
<!-- <field name="name">装夹</field>-->
|
||||
<!-- <field name="code">clamping</field>-->
|
||||
<!-- <field name="time_mode">manual</field>-->
|
||||
<!-- <field name="time_cycle">60</field>-->
|
||||
<!-- <field name="active">True</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="mrp_routing_workcenter_template_pre_ternary_sf" model="mrp.routing.workcenter">-->
|
||||
<!-- <field name="name">前置三元定位检测</field>-->
|
||||
<!-- <field name="code">pre-ternary</field>-->
|
||||
<!-- <field name="time_mode">manual</field>-->
|
||||
<!-- <field name="time_cycle">60</field>-->
|
||||
<!-- <field name="active">True</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="mrp_routing_workcenter_template_cnc_sf" model="mrp.routing.workcenter">-->
|
||||
<!-- <field name="name">CNC加工</field>-->
|
||||
<!-- <field name="code">CNC machining</field>-->
|
||||
<!-- <field name="time_mode">manual</field>-->
|
||||
<!-- <field name="time_cycle">60</field>-->
|
||||
<!-- <field name="active">True</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="mrp_routing_workcenter_template_post_ternary_sf" model="mrp.routing.workcenter">-->
|
||||
<!-- <field name="name">后置三元质量检测</field>-->
|
||||
<!-- <field name="code">post ternary</field>-->
|
||||
<!-- <field name="time_mode">manual</field>-->
|
||||
<!-- <field name="time_cycle">60</field>-->
|
||||
<!-- <field name="active">True</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="mrp_routing_workcenter_template_remove_clamping_sf" model="mrp.routing.workcenter">-->
|
||||
<!-- <field name="name">解除装夹</field>-->
|
||||
<!-- <field name="code">remove the clamping</field>-->
|
||||
<!-- <field name="time_mode">manual</field>-->
|
||||
<!-- <field name="time_cycle">60</field>-->
|
||||
<!-- <field name="active">True</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- </data>-->
|
||||
<!--</odoo>-->
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="product_template_sf" model="product.product">
|
||||
<field name="name">CNC加工产品模板</field>
|
||||
<field name="categ_id" ref="product.product_category_5"/>
|
||||
<field name="invoice_policy">delivery</field>
|
||||
<field name="detailed_type">product</field>
|
||||
<field name="purchase_ok">false</field>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="active">false</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,5 +1,4 @@
|
||||
from. import sf_base
|
||||
from. import sf_common
|
||||
from. import process
|
||||
from. import product_template
|
||||
from. import sale_order
|
||||
from . import base
|
||||
from . import common
|
||||
|
||||
|
||||
|
||||
@@ -13,29 +13,29 @@ _logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MachineBrandTags(models.Model):
|
||||
_name = 'mrs.machine.brand.tags'
|
||||
_name = 'sf.machine.brand.tags'
|
||||
_description = '标签'
|
||||
name = fields.Char('名称', size=50)
|
||||
color = fields.Integer('颜色', default=0)
|
||||
|
||||
|
||||
class MachineControlSystem(models.Model):
|
||||
_name = 'mrs.machine.control_system'
|
||||
_name = 'sf.machine.control_system'
|
||||
_description = '控制系统'
|
||||
|
||||
code = fields.Char('编码', size=10)
|
||||
name = fields.Char('名称', size=10)
|
||||
brand_id = fields.Many2one('mrs.machine.brand', '品牌')
|
||||
brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
# 品牌标签
|
||||
class MachineBrand(models.Model):
|
||||
_name = 'mrs.machine.brand'
|
||||
_name = 'sf.machine.brand'
|
||||
_description = '品牌'
|
||||
|
||||
name = fields.Char('名称')
|
||||
tag_ids = fields.Many2many('mrs.machine.brand.tags', 'rel_machine_brand_tags', string='类别')
|
||||
tag_ids = fields.Many2many('sf.machine.brand.tags', 'rel_machine_brand_tags', string='类别')
|
||||
image_brand = fields.Image("品牌图片")
|
||||
active = fields.Boolean('有效', default=True)
|
||||
code = fields.Char('编码')
|
||||
@@ -43,7 +43,7 @@ class MachineBrand(models.Model):
|
||||
|
||||
# 机床
|
||||
class MachineTool(models.Model):
|
||||
_name = 'mrs.machine_tool'
|
||||
_name = 'sf.machine_tool'
|
||||
_description = '机床'
|
||||
MTcode = fields.Char("编码")
|
||||
code = fields.Char('行业编码')
|
||||
@@ -64,11 +64,11 @@ class MachineTool(models.Model):
|
||||
c_axis = fields.Integer('C轴')
|
||||
remark = fields.Text('备注')
|
||||
precision = fields.Float('加工精度')
|
||||
control_system_id = fields.Many2one('mrs.machine.control_system',
|
||||
control_system_id = fields.Many2one('sf.machine.control_system',
|
||||
string="控制系统")
|
||||
# 多个机床型号对应一个机床
|
||||
type_id = fields.Many2one('mrs.machine_tool.type', '型号')
|
||||
brand_id = fields.Many2one('mrs.machine.brand', string='品牌')
|
||||
type_id = fields.Many2one('sf.machine_tool.type', '型号')
|
||||
brand_id = fields.Many2one('sf.machine.brand', string='品牌')
|
||||
state = fields.Selection(
|
||||
[("正常", "正常"), ("故障", "故障"), ("不可用", "不可用")],
|
||||
default='正常', string="状态")
|
||||
@@ -145,10 +145,10 @@ class MachineTool(models.Model):
|
||||
def enroll_machine_tool(self):
|
||||
sf_sync_config = self.env['res.config.settings'].get_values()
|
||||
token = sf_sync_config['token']
|
||||
mrs_secret_key = sf_sync_config['mrs_secret_key']
|
||||
headers = Common.get_headers(self, token, mrs_secret_key)
|
||||
strurl = sf_sync_config['mrs_url'] + self.crea_url
|
||||
objs_all = request.env['mrs.machine_tool'].sudo().search([])
|
||||
sf_secret_key = sf_sync_config['sf_secret_key']
|
||||
headers = Common.get_headers(self, token, sf_secret_key)
|
||||
strurl = sf_sync_config['sf_url'] + self.crea_url
|
||||
objs_all = request.env['sf.machine_tool'].sudo().search([])
|
||||
machine_tool_list = []
|
||||
if objs_all:
|
||||
for item in objs_all:
|
||||
@@ -162,10 +162,10 @@ class MachineTool(models.Model):
|
||||
'number_of_knife_library': item.number_of_knife_library,
|
||||
'rotate_speed': item.rotate_speed,
|
||||
'number_of_axles': item.number_of_axles,
|
||||
'control_system_id': self.env['mrs.machine.control_system'].search(
|
||||
'control_system_id': self.env['sf.machine.control_system'].search(
|
||||
[('id', '=', item.control_system_id.id)]).code,
|
||||
'type_id': self.env['mrs.machine_tool.type'].search([('id', '=', item.type_id.id)]).code,
|
||||
'brand_id': self.env['mrs.machine.brand'].search([('id', '=', item.brand_id.id)]).code,
|
||||
'type_id': self.env['sf.machine_tool.type'].search([('id', '=', item.type_id.id)]).code,
|
||||
'brand_id': self.env['sf.machine.brand'].search([('id', '=', item.brand_id.id)]).code,
|
||||
'supplier_id': item.supplier_id.id,
|
||||
'x_axis': item.x_axis,
|
||||
'y_axis': item.y_axis,
|
||||
@@ -188,19 +188,19 @@ class MachineTool(models.Model):
|
||||
|
||||
|
||||
class MachineToolType(models.Model):
|
||||
_name = 'mrs.machine_tool.type'
|
||||
_name = 'sf.machine_tool.type'
|
||||
_description = '机床型号'
|
||||
# _order = 'priority desc, code, name, id'
|
||||
|
||||
name = fields.Char('名称')
|
||||
brand_id = fields.Many2one('mrs.machine.brand', string='品牌')
|
||||
brand_id = fields.Many2one('sf.machine.brand', string='品牌')
|
||||
knife_type = fields.Selection(
|
||||
[("BT40", "BT40"), ("BT30", "BT30")],
|
||||
default="", string="刀把类型")
|
||||
number_of_knife_library = fields.Integer('刀库数量')
|
||||
rotate_speed = fields.Integer('转速')
|
||||
# 多个型号对应一个机床
|
||||
machine_tool_id = fields.Many2one('mrs.machine_tool', '机床')
|
||||
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
|
||||
number_of_axles = fields.Selection(
|
||||
[("三轴", "三轴"), ("四轴", "四轴"), ("五轴", "五轴")],
|
||||
default="", string="轴数")
|
||||
@@ -212,7 +212,7 @@ class MachineToolType(models.Model):
|
||||
c_axis = fields.Integer('C轴')
|
||||
remark = fields.Text('备注')
|
||||
precision = fields.Float('加工精度')
|
||||
control_system_id = fields.Many2one('mrs.machine.control_system',
|
||||
control_system_id = fields.Many2one('sf.machine.control_system',
|
||||
string="控制系统")
|
||||
active = fields.Boolean('有效', default=True)
|
||||
code = fields.Char('编码')
|
||||
@@ -220,7 +220,7 @@ class MachineToolType(models.Model):
|
||||
|
||||
# 刀具
|
||||
class CuttingTool(models.Model):
|
||||
_name = 'mrs.cutting_tool.category'
|
||||
_name = 'sf.cutting_tool.category'
|
||||
_description = '刀具类别'
|
||||
|
||||
code = fields.Char('编码')
|
||||
@@ -231,7 +231,7 @@ class CuttingTool(models.Model):
|
||||
|
||||
|
||||
class CuttingToolType(models.Model):
|
||||
_name = 'mrs.cutting_tool.type'
|
||||
_name = 'sf.cutting_tool.type'
|
||||
_description = '刀具型号'
|
||||
|
||||
code = fields.Char('编码')
|
||||
@@ -243,26 +243,8 @@ class CuttingToolType(models.Model):
|
||||
taper_shank_length = fields.Integer('锥柄长')
|
||||
tool_length = fields.Integer('刀具总长')
|
||||
blade_number = fields.Integer('刃数')
|
||||
category_id = fields.Many2one('mrs.cutting_tool.category', string='刀具类别')
|
||||
brand_id = fields.Many2one('mrs.machine.brand', string='品牌')
|
||||
category_id = fields.Many2one('sf.cutting_tool.category', string='刀具类别')
|
||||
brand_id = fields.Many2one('sf.machine.brand', string='品牌')
|
||||
remark = fields.Text('备注')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
class CNCprocessing(models.Model):
|
||||
_name = 'cnc.processing'
|
||||
_description = "CNC加工"
|
||||
|
||||
cnc_id = fields.Many2one('ir.attachment')
|
||||
FNo = fields.Char(string="序号")
|
||||
FPGName = fields.Char(string="程序名")
|
||||
FKnifeName = fields.Char(string="刀具名称")
|
||||
FDNo = fields.Char(string="刀号")
|
||||
FWorkType = fields.Char(string="加工类型")
|
||||
FXY = fields.Char(string="余量_X/Y")
|
||||
FZ = fields.Char(string="余量_Z")
|
||||
FJGSD = fields.Char(string="加工深度(Z)")
|
||||
FSCCD = fields.Char(string="刀具伸出长度")
|
||||
FDJSpec = fields.Char(string="刀柄型号")
|
||||
FJGDate = fields.Datetime(string="预计加工时间")
|
||||
FComment = fields.Char(string="备注")
|
||||
@@ -7,64 +7,65 @@ _logger = logging.getLogger(__name__)
|
||||
|
||||
# 材料
|
||||
class MrsProductionMaterials(models.Model):
|
||||
_name = 'mrs.production.materials'
|
||||
_name = 'sf.production.materials'
|
||||
_description = '材料'
|
||||
remark = fields.Text("备注")
|
||||
|
||||
materials_no = fields.Char("编码")
|
||||
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("编码")
|
||||
materials_model_ids = fields.One2many('sf.materials.model', 'materials_id', '材料型号')
|
||||
remark = fields.Text("备注")
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
# 材料型号
|
||||
class MrsMaterialModel(models.Model):
|
||||
_name = 'mrs.materials.model'
|
||||
_name = 'sf.materials.model'
|
||||
_description = '材料型号'
|
||||
remark = fields.Text("备注")
|
||||
|
||||
materials_no = fields.Char("编码")
|
||||
materials_num = fields.Char("编码号")
|
||||
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("编码号")
|
||||
materials_no = fields.Char("编码")
|
||||
materials_id = fields.Many2one('sf.production.materials', "材料名")
|
||||
remark = fields.Text("备注")
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
# 工艺 编码,名称,备注
|
||||
class MrsProductionProcess(models.Model):
|
||||
_name = 'mrs.production.process'
|
||||
_name = 'sf.production.process'
|
||||
_description = '表面工艺'
|
||||
name = fields.Char('表面工艺')
|
||||
remark = fields.Text("备注")
|
||||
processing_order_ids = fields.One2many('mrs.processing.order', 'production_process_id', string='工序')
|
||||
partner_process_ids = fields.Many2many('res.partner', 'process_ids', '加工工厂')
|
||||
|
||||
process_encode = fields.Char("编码")
|
||||
name = fields.Char('名称')
|
||||
remark = fields.Text("备注")
|
||||
processing_order_ids = fields.One2many('sf.processing.order', 'production_process_id', string='工序')
|
||||
partner_process_ids = fields.Many2many('res.partner', 'process_ids', '加工工厂')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
class MrsProcessingTechnology(models.Model):
|
||||
_name = 'mrs.processing.technology'
|
||||
_name = 'sf.processing.technology'
|
||||
_description = '加工工艺'
|
||||
remark = fields.Text("备注")
|
||||
name = fields.Char('加工工艺', index=True)
|
||||
|
||||
name = fields.Char('名称', index=True)
|
||||
remark = fields.Text('备注', index=True)
|
||||
process_encode = fields.Char("编码")
|
||||
processing_order_ids = fields.Many2many('mrs.processing.order', 'mrs_associated_processes',
|
||||
processing_order_ids = fields.Many2many('sf.processing.order', 'sf_associated_processes',
|
||||
index=True, string='工序')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
class MrsProcessingOrder(models.Model):
|
||||
_name = 'mrs.processing.order'
|
||||
_name = 'sf.processing.order'
|
||||
_description = '工序'
|
||||
sequence = fields.Integer('Sequence')
|
||||
|
||||
processing_technology_ids = fields.Many2many('mrs.processing.technology', 'mrs_associated_processes',
|
||||
|
||||
processing_technology_ids = fields.Many2many('sf.processing.technology', 'sf_associated_processes',
|
||||
index=True, string='加工工艺')
|
||||
|
||||
production_process_id = fields.Many2one('mrs.production.process', string="表面工艺")
|
||||
|
||||
|
||||
@@ -72,7 +73,7 @@ class Tray(models.Model):
|
||||
_name = 'sf.tray'
|
||||
_description = '托盘'
|
||||
|
||||
code = fields.Char('编码',copy=False)
|
||||
code = fields.Char('编码', copy=False)
|
||||
name = fields.Char('名称')
|
||||
state = fields.Selection(
|
||||
[("空闲", "空闲"), ("占用", "占用"), ("报损", "报损")],
|
||||
@@ -1,72 +0,0 @@
|
||||
from odoo import fields, models, api
|
||||
|
||||
|
||||
class ModelType(models.Model):
|
||||
_name = 'sf.model.type'
|
||||
_description = '模型类型'
|
||||
|
||||
name = fields.Char('名称')
|
||||
embryo_tolerance = fields.Integer('胚料的容余量')
|
||||
routing_tmpl_ids = fields.One2many('sf.model.type.routing.sort', 'model_type_id', '工序模板')
|
||||
|
||||
|
||||
class ResMrpRoutingWorkcenter(models.Model):
|
||||
_inherit = 'mrp.routing.workcenter'
|
||||
|
||||
routing_type = fields.Selection([
|
||||
('获取CNC加工程序', '获取CNC加工程序'),
|
||||
('装夹', '装夹'),
|
||||
('前置三元定位检测', '前置三元定位检测'),
|
||||
('CNC加工', 'CNC加工'),
|
||||
('后置三元质量检测', '后置三元质量检测'),
|
||||
('解除装夹', '解除装夹'),
|
||||
], string="工序类型")
|
||||
is_repeat = fields.Boolean('重复', default=False)
|
||||
workcenter_id = fields.Many2one('mrp.workcenter', required=False)
|
||||
workcenter_ids = fields.Many2many('mrp.workcenter', 'rel_workcenter_route', required=True)
|
||||
bom_id = fields.Many2one('mrp.bom', required=False)
|
||||
|
||||
# 获得当前登陆者公司
|
||||
def get_company_id(self):
|
||||
self.company_id = self.env.user.company_id.id
|
||||
|
||||
company_id = fields.Many2one('res.company', compute="get_company_id", related=False)
|
||||
|
||||
# 工单对应的工作中心,根据工序中的工作中心去匹配,
|
||||
# 如果只配置了一个工作中心,则默认采用该工作中心;
|
||||
# 如果有多个工作中心,
|
||||
# 则根据该工作中心的工单个数进行分配(优先分配给工单个数最少的);
|
||||
def get_workcenter(self, workcenter_ids):
|
||||
if workcenter_ids:
|
||||
if len(workcenter_ids) == 1:
|
||||
return workcenter_ids[0]
|
||||
elif len(workcenter_ids) >= 2:
|
||||
# workcenter_ids_str = ','.join([str(s) for s in workcenter_ids])
|
||||
self.env.cr.execute("""
|
||||
SELECT workcenter_id FROM mrp_workorder where workcenter_id
|
||||
in %s group by workcenter_id
|
||||
order by count(*),workcenter_id asc limit 1 """, [tuple(workcenter_ids)])
|
||||
return self.env.cr.dictfetchall()[0].get('workcenter_id')
|
||||
|
||||
|
||||
class ModelTypeRoutingSort(models.Model):
|
||||
_name = 'sf.model.type.routing.sort'
|
||||
_description = '工序排序'
|
||||
|
||||
sequence = fields.Integer('Sequence')
|
||||
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
|
||||
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
|
||||
routing_type = fields.Selection([
|
||||
('获取CNC加工程序', '获取CNC加工程序'),
|
||||
('装夹', '装夹'),
|
||||
('前置三元定位检测', '前置三元定位检测'),
|
||||
('CNC加工', 'CNC加工'),
|
||||
('后置三元质量检测', '后置三元质量检测'),
|
||||
('解除装夹', '解除装夹'),
|
||||
], string="工序类型", related='route_workcenter_id.routing_type')
|
||||
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
|
||||
model_type_id = fields.Many2one('sf.model.type')
|
||||
|
||||
_sql_constraints = [
|
||||
('route_model_type_uniq', 'unique (route_workcenter_id,model_type_id)', '工序不能重复!')
|
||||
]
|
||||
@@ -1,157 +0,0 @@
|
||||
from odoo import models, fields, api
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class ResProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
# 模型的长,宽,高,体积,精度,材料
|
||||
model_long = fields.Float('模型长[mm]', digits=(16, 3))
|
||||
model_width = fields.Float('模型宽[mm]', digits=(16, 3))
|
||||
model_height = fields.Float('模型高[mm]', digits=(16, 3))
|
||||
model_volume = fields.Float('模型体积[mm³]', digits=(16, 3), compute='_compute_model_volume', store=True)
|
||||
model_precision = fields.Float('精度要求', digits=(16, 3))
|
||||
model_materials_id = fields.Many2one('mrs.production.materials', string='模型材料')
|
||||
model_materials_type_id = fields.Many2one('mrs.materials.model', string='模型材料型号')
|
||||
model_type_id = fields.Many2one('sf.model.type', string='模型类型')
|
||||
model_processing_panel = fields.Char('模型加工面板')
|
||||
model_surface_process_id = fields.Many2one('mrs.production.process', string='表面工艺')
|
||||
model_process_parameters_id = fields.Many2one('mrs.processing.technology', string='工艺参数')
|
||||
# price = fields.Float('单价', digits=(16, 3))
|
||||
# number = fields.Integer('数量', default=1)
|
||||
# total_amount = fields.Float('金额', digits=(16, 3), compute='_compute_total_amount')
|
||||
# model_number =
|
||||
|
||||
|
||||
# 胚料的长,宽,高
|
||||
embryo_long = fields.Float('胚料长[mm]', digits=(16, 3), onchange='count_embryo_size')
|
||||
embryo_width = fields.Float('胚料宽[mm]', digits=(16, 3), onchange='count_embryo_size')
|
||||
embryo_height = fields.Float('胚料高[mm]', digits=(16, 3), onchange='count_embryo_size')
|
||||
embryo_materials_id = fields.Many2one('mrs.production.materials', string='胚料材料')
|
||||
embryo_materials_type_id = fields.Many2one('mrs.materials.model', string='胚料材料型号')
|
||||
|
||||
long = fields.Float('长[mm]', digits=(16, 3), onchange='add_product_size')
|
||||
width = fields.Float('宽[mm]', digits=(16, 3), onchange='add_product_size')
|
||||
height = fields.Float('高[mm]', digits=(16, 3), onchange='add_product_size')
|
||||
materials_id = fields.Many2one('mrs.production.materials', string='材料')
|
||||
materials_type_id = fields.Many2one('mrs.materials.model', string='材料型号')
|
||||
|
||||
|
||||
volume = fields.Float(compute='_compute_volume', store=True)
|
||||
|
||||
@api.depends('embryo_long', 'embryo_width', 'embryo_height')
|
||||
def _compute_volume(self):
|
||||
self.volume = self.embryo_long * self.embryo_width * self.embryo_height
|
||||
|
||||
@api.depends('model_long', 'model_width', 'model_height')
|
||||
def _compute_model_volume(self):
|
||||
self.model_volume = self.model_long * self.model_width * self.model_height
|
||||
|
||||
# 业务平台分配工厂后在智能工厂先创建销售订单再创建该产品
|
||||
def product_create(self, product_id, item, order_id, order_number, i):
|
||||
copy_product_id = product_id.with_user(self.env.ref("base.user_admin")).copy()
|
||||
copy_product_id.product_tmpl_id.active = True
|
||||
vals = {
|
||||
'name': '%s-%s' % (order_id.name, i),
|
||||
'model_long': item['model_long'],
|
||||
'model_width': item['model_width'],
|
||||
'model_height': item['model_height'],
|
||||
'model_volume': item['model_volume'],
|
||||
'list_price': item['price'],
|
||||
'model_materials_id': self.env['mrs.production.materials'].search(
|
||||
[('materials_no', '=', item['texture_code'])]).id,
|
||||
'model_materials_type_id': self.env['mrs.materials.model'].search(
|
||||
[('materials_no', '=', item['texture_type_code'])]).id,
|
||||
'model_surface_process_id': self.env['mrs.production.process'].search(
|
||||
[('process_encode', '=', item['surface_process_code'])]).id,
|
||||
'model_process_parameters_id': self.env['mrs.processing.technology'].search(
|
||||
[('process_encode', '=', item['process_parameters_code'])]).id,
|
||||
''
|
||||
'default_code': '%s-%s' % (order_number, i),
|
||||
'barcode': item['barcode'],
|
||||
'active': True
|
||||
}
|
||||
copy_product_id.sudo().write(vals)
|
||||
return copy_product_id
|
||||
|
||||
|
||||
# 在产品上增加模型类型和加工的面(例如:A、B) ,
|
||||
# 并根据模型类型计算出产品的胚料尺寸;
|
||||
@api.onchange('model_type_id')
|
||||
def count_embryo_size(self):
|
||||
if not self.model_type_id:
|
||||
return
|
||||
bom = self.env['product.product'].search(
|
||||
[('categ_id.is_embryo', '=', True), ('product_tmpl_id', '=', self.id)],
|
||||
limit=1,
|
||||
order='volume desc'
|
||||
)
|
||||
for item in self:
|
||||
item.embryo_long = bom.embryo_long + 1
|
||||
item.embryo_width = bom.embryo_width + 1
|
||||
item.embryo_height = bom.embryo_height + 1
|
||||
|
||||
|
||||
|
||||
|
||||
# 根据模型类型默认给模型的长高宽加配置的长度;
|
||||
@api.onchange('model_type_id')
|
||||
def add_product_size(self):
|
||||
if not self.model_type_id:
|
||||
return
|
||||
model_type = self.env['sf.model.type'].search(
|
||||
[('id', '=', self.model_type_id.id)])
|
||||
print(self.model_long)
|
||||
print(self.model_width)
|
||||
print(self.model_height)
|
||||
for item in self:
|
||||
print(item.model_long)
|
||||
print(item.model_width)
|
||||
print(item.model_height)
|
||||
item.model_long = item.model_long + model_type.embryo_tolerance
|
||||
item.model_width = item.model_width + model_type.embryo_tolerance
|
||||
item.model_height = item.model_width + model_type.embryo_tolerance
|
||||
|
||||
|
||||
|
||||
class ResProductCategory(models.Model):
|
||||
_inherit = "product.category"
|
||||
|
||||
is_embryo = fields.Boolean('胚料')
|
||||
|
||||
|
||||
class ResMrpBom(models.Model):
|
||||
_inherit = 'mrp.bom'
|
||||
|
||||
# 业务平台分配工厂后在智能工厂先创建销售订单再创建该产品后再次进行创建bom
|
||||
def bom_create(self, product):
|
||||
bom_id = self.env['mrp.bom'].create({
|
||||
'product_tmpl_id': product.product_tmpl_id.id,
|
||||
'type': 'normal',
|
||||
'product_qty': 1,
|
||||
'product_uom_id': 1
|
||||
})
|
||||
return bom_id
|
||||
|
||||
# 生成产品BOM匹配胚料,胚料的匹配规则:
|
||||
# 一、匹配的胚料类别需要带有胚料的标签;
|
||||
# 二、胚料的材料型号与生成产品的材料型号一致;
|
||||
# 三、胚料的长宽高均要大于模型的长宽高;
|
||||
# 四、如果匹配成功多个胚料,则选取体积最小的胚料;
|
||||
def bom_create_Line(self, product):
|
||||
embryo = self.env['product.product'].search(
|
||||
[('categ_id.is_embryo', '=', True), ('embryo_materials_type_id', '=', product.model_materials_type_id.id),
|
||||
('embryo_long', '>', product.model_long), ('embryo_width', '>', product.model_width),
|
||||
('embryo_height', '>', product.model_height)
|
||||
],
|
||||
limit=1,
|
||||
order='volume desc'
|
||||
)
|
||||
vals = {
|
||||
'bom_id': self.id,
|
||||
'product_id': embryo.id,
|
||||
'product_tmpl_id': embryo.product_tmpl_id.id,
|
||||
'product_qty': 1,
|
||||
'product_uom_id': 1
|
||||
}
|
||||
return self.env['mrp.bom.line'].create(vals)
|
||||
@@ -1,34 +0,0 @@
|
||||
from odoo import models, fields
|
||||
from odoo.exceptions import ValidationError
|
||||
import datetime
|
||||
|
||||
|
||||
class ReSaleOrder(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
|
||||
deadline_of_delivery = fields.Date('交货截止日期')
|
||||
|
||||
# 业务平台分配工厂后在智能工厂先创建销售订单
|
||||
def sale_order_create(self, deadline_of_delivery, company_id):
|
||||
now_time = datetime.datetime.now()
|
||||
order_id = self.env['sale.order'].sudo().create({
|
||||
'company_id': company_id.id,
|
||||
'date_order': now_time,
|
||||
'name': self.env['ir.sequence'].next_by_code('sale.order', sequence_date=now_time),
|
||||
'partner_id': 8,
|
||||
'state': 'sale',
|
||||
'user_id': 6,
|
||||
'deadline_of_delivery': deadline_of_delivery
|
||||
})
|
||||
return order_id
|
||||
|
||||
# 业务平台分配工厂时在创建完产品后再创建销售明细信息
|
||||
def sale_order_create_line(self, product, item):
|
||||
vals = {
|
||||
'order_id': self.id,
|
||||
'product_id': product.id,
|
||||
'name': '%s/%s/%s/%s/%s' % (item['model_long'], item['model_width'], item['model_height'], item['model_volume'], product.model_materials_id.name),
|
||||
'price_unit': item['price'],
|
||||
'product_uom_qty': item['number']
|
||||
}
|
||||
return self.env['sale.order.line'].create(vals)
|
||||
@@ -1,21 +1,20 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_mrs_machine_tool,mrs_machine_tool,model_mrs_machine_tool,base.group_user,1,1,1,1
|
||||
access_mrs_cutting_tool_category,mrs_cutting_tool_category,model_mrs_cutting_tool_category,base.group_user,1,1,1,1
|
||||
access_mrs_machine_tool_type,mrs_machine_tool_type,model_mrs_machine_tool_type,base.group_user,1,1,1,1
|
||||
access_mrs_cutting_tool_type,mrs_cutting_tool_type,model_mrs_cutting_tool_type,base.group_user,1,1,1,1
|
||||
access_mrs_machine_brand,mrs_machine_brand,model_mrs_machine_brand,base.group_user,1,1,1,1
|
||||
access_mrs_machine_brand_tags,mrs_machine_brand_tags,model_mrs_machine_brand_tags,base.group_user,1,1,1,1
|
||||
access_mrs_machine_control_system,mrs_machine_control_system,model_mrs_machine_control_system,base.group_user,1,1,1,1
|
||||
|
||||
access_mrs_processing_order,mrs_processing_order,model_mrs_processing_order,base.group_user,1,1,1,1
|
||||
access_mrs_production_process,mrs_production_process,model_mrs_production_process,base.group_user,1,1,1,1
|
||||
access_mrs_production_materials,mrs_production_materials,model_mrs_production_materials,base.group_user,1,1,1,1
|
||||
access_mrs_materials_model,mrs_materials_model,model_mrs_materials_model,base.group_user,1,1,1,1
|
||||
access_mrs_processing_technology,mrs_processing_technology,model_mrs_processing_technology,base.group_user,1,1,1,1
|
||||
access_sf_machine_tool,sf_machine_tool,model_sf_machine_tool,base.group_user,1,1,1,1
|
||||
access_sf_cutting_tool_category,sf_cutting_tool_category,model_sf_cutting_tool_category,base.group_user,1,1,1,1
|
||||
access_sf_machine_tool_type,sf_machine_tool_type,model_sf_machine_tool_type,base.group_user,1,1,1,1
|
||||
access_sf_cutting_tool_type,sf_cutting_tool_type,model_sf_cutting_tool_type,base.group_user,1,1,1,1
|
||||
access_sf_machine_brand,sf_machine_brand,model_sf_machine_brand,base.group_user,1,1,1,1
|
||||
access_sf_machine_brand_tags,sf_machine_brand_tags,model_sf_machine_brand_tags,base.group_user,1,1,1,1
|
||||
access_sf_machine_control_system,sf_machine_control_system,model_sf_machine_control_system,base.group_user,1,1,1,1
|
||||
access_sf_processing_order,sf_processing_order,model_sf_processing_order,base.group_user,1,1,1,1
|
||||
access_sf_production_process,sf_production_process,model_sf_production_process,base.group_user,1,1,1,1
|
||||
access_sf_production_materials,sf_production_materials,model_sf_production_materials,base.group_user,1,1,1,1
|
||||
access_sf_materials_model,sf_materials_model,model_sf_materials_model,base.group_user,1,1,1,1
|
||||
access_sf_processing_technology,sf_processing_technology,model_sf_processing_technology,base.group_user,1,1,1,1
|
||||
access_sf_tray,sf_tray,model_sf_tray,base.group_user,1,1,1,1
|
||||
access_cnc_processing,cnc_processing,model_cnc_processing,base.group_user,1,1,1,1
|
||||
access_sf_model_type,sf_model_type,model_sf_model_type,base.group_user,1,1,1,1
|
||||
access_sf_model_type_routing_sort,sf_model_type_routing_sort,model_sf_model_type_routing_sort,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<odoo>
|
||||
#------------------品牌------------------
|
||||
<record model="ir.ui.view" id="search_mrs_machine_brand_view">
|
||||
<field name="name">search.mrs.machine.brand</field>
|
||||
<field name="model">mrs.machine.brand</field>
|
||||
<record model="ir.ui.view" id="search_sf_machine_brand_view">
|
||||
<field name="name">search.sf.machine.brand</field>
|
||||
<field name="model">sf.machine.brand</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="品牌">
|
||||
<!-- <field name="name" string="名称"-->
|
||||
@@ -17,9 +17,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="tree_mrs_machine_brand_view">
|
||||
<field name="name">tree.mrs.machine.brand</field>
|
||||
<field name="model">mrs.machine.brand</field>
|
||||
<record model="ir.ui.view" id="tree_sf_machine_brand_view">
|
||||
<field name="name">tree.sf.machine.brand</field>
|
||||
<field name="model">sf.machine.brand</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="品牌">
|
||||
<field name="code"/>
|
||||
@@ -29,9 +29,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="form_mrs_machine_brand">
|
||||
<field name="name">form.mrs.machine.brand</field>
|
||||
<field name="model">mrs.machine.brand</field>
|
||||
<record model="ir.ui.view" id="form_sf_machine_brand">
|
||||
<field name="name">form.sf.machine.brand</field>
|
||||
<field name="model">sf.machine.brand</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="品牌">
|
||||
<!-- <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>-->
|
||||
@@ -55,10 +55,10 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrs_machine_brand" model="ir.actions.act_window">
|
||||
<record id="action_sf_machine_brand" model="ir.actions.act_window">
|
||||
<field name="name">品牌</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.machine.brand</field>
|
||||
<field name="res_model">sf.machine.brand</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
@@ -71,9 +71,9 @@
|
||||
|
||||
#------------------机床型号------------------
|
||||
|
||||
<record model="ir.ui.view" id="search_mrs_machine_tool_type_view">
|
||||
<field name="name">search.mrs.machine_tool.type</field>
|
||||
<field name="model">mrs.machine_tool.type</field>
|
||||
<record model="ir.ui.view" id="search_sf_machine_tool_type_view">
|
||||
<field name="name">search.sf.machine_tool.type</field>
|
||||
<field name="model">sf.machine_tool.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="机床型号">
|
||||
<field name="name" string="模糊搜索"
|
||||
@@ -82,9 +82,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="tree_mrs_machine_tool_type_view">
|
||||
<field name="name">tree.mrs.machine_tool.type</field>
|
||||
<field name="model">mrs.machine_tool.type</field>
|
||||
<record model="ir.ui.view" id="tree_sf_machine_tool_type_view">
|
||||
<field name="name">tree.sf.machine_tool.type</field>
|
||||
<field name="model">sf.machine_tool.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="机床型号">
|
||||
<field name="code"/>
|
||||
@@ -95,9 +95,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="form_mrs_machine_tool_type">
|
||||
<field name="name">form.mrs.machine_tool.type</field>
|
||||
<field name="model">mrs.machine_tool.type</field>
|
||||
<record model="ir.ui.view" id="form_sf_machine_tool_type">
|
||||
<field name="name">form.sf.machine_tool.type</field>
|
||||
<field name="model">sf.machine_tool.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="机床型号">
|
||||
<group string="基本信息" name="base_info">
|
||||
@@ -155,10 +155,10 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrs_machine_tool_type" model="ir.actions.act_window">
|
||||
<record id="action_sf_machine_tool_type" model="ir.actions.act_window">
|
||||
<field name="name">机床型号</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.machine_tool.type</field>
|
||||
<field name="res_model">sf.machine_tool.type</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
@@ -171,9 +171,9 @@
|
||||
|
||||
#------------------刀具型号------------------
|
||||
|
||||
<record model="ir.ui.view" id="search_mrs_cutting_tool_type_view">
|
||||
<field name="name">search.mrs.cutting_tool.type</field>
|
||||
<field name="model">mrs.cutting_tool.type</field>
|
||||
<record model="ir.ui.view" id="search_sf_cutting_tool_type_view">
|
||||
<field name="name">search.sf.cutting_tool.type</field>
|
||||
<field name="model">sf.cutting_tool.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="刀具型号">
|
||||
<field name="name" string="模糊搜索"
|
||||
@@ -183,8 +183,8 @@
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="tree_cutting_tool_type_view">
|
||||
<field name="name">tree.mrs.cutting_tool.type</field>
|
||||
<field name="model">mrs.cutting_tool.type</field>
|
||||
<field name="name">tree.sf.cutting_tool.type</field>
|
||||
<field name="model">sf.cutting_tool.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="刀具型号">
|
||||
<field name="code"/>
|
||||
@@ -194,9 +194,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="form_mrs_cutting_tool_type">
|
||||
<field name="name">form.mrs.cutting_tool.type</field>
|
||||
<field name="model">mrs.cutting_tool.type</field>
|
||||
<record model="ir.ui.view" id="form_sf_cutting_tool_type">
|
||||
<field name="name">form.sf.cutting_tool.type</field>
|
||||
<field name="model">sf.cutting_tool.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="刀具型号">
|
||||
<group string="基本信息">
|
||||
@@ -230,10 +230,10 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrs_cutting_tool_type" model="ir.actions.act_window">
|
||||
<record id="action_sf_cutting_tool_type" model="ir.actions.act_window">
|
||||
<field name="name">刀具型号</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.cutting_tool.type</field>
|
||||
<field name="res_model">sf.cutting_tool.type</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
@@ -246,9 +246,9 @@
|
||||
|
||||
#------------------刀具类别------------------
|
||||
|
||||
<record model="ir.ui.view" id="search_mrs_cutting_tool_category_view">
|
||||
<field name="name">search.mrs.cutting_tool.category</field>
|
||||
<field name="model">mrs.cutting_tool.category</field>
|
||||
<record model="ir.ui.view" id="search_sf_cutting_tool_category_view">
|
||||
<field name="name">search.sf.cutting_tool.category</field>
|
||||
<field name="model">sf.cutting_tool.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="刀具类别">
|
||||
<field name="name" string="模糊搜索"
|
||||
@@ -257,9 +257,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="tree_mrs_cutting_tool_category_view">
|
||||
<field name="name">tree.mrs.cutting_tool.category</field>
|
||||
<field name="model">mrs.cutting_tool.category</field>
|
||||
<record model="ir.ui.view" id="tree_sf_cutting_tool_category_view">
|
||||
<field name="name">tree.sf.cutting_tool.category</field>
|
||||
<field name="model">sf.cutting_tool.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="刀具类别">
|
||||
<field name="code"/>
|
||||
@@ -268,9 +268,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="mrs_cutting_tool_category_form">
|
||||
<field name="name">form.mrs.cutting_tool.category</field>
|
||||
<field name="model">mrs.cutting_tool.category</field>
|
||||
<record model="ir.ui.view" id="sf_cutting_tool_category_form">
|
||||
<field name="name">form.sf.cutting_tool.category</field>
|
||||
<field name="model">sf.cutting_tool.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="刀具类别">
|
||||
<group string="基本信息">
|
||||
@@ -306,10 +306,10 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrs_cutting_tool_category" model="ir.actions.act_window">
|
||||
<record id="action_sf_cutting_tool_category" model="ir.actions.act_window">
|
||||
<field name="name">刀具类别</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.cutting_tool.category</field>
|
||||
<field name="res_model">sf.cutting_tool.category</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
@@ -322,9 +322,9 @@
|
||||
|
||||
#------------------机床注册------------------
|
||||
|
||||
<record model="ir.ui.view" id="search_mrs_machine_tool_view">
|
||||
<field name="name">search.mrs.machine_tool</field>
|
||||
<field name="model">mrs.machine_tool</field>
|
||||
<record model="ir.ui.view" id="search_sf_machine_tool_view">
|
||||
<field name="name">search.sf.machine_tool</field>
|
||||
<field name="model">sf.machine_tool</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="机床">
|
||||
<field name="name" string="名称" filter_domain="[('name', 'ilike', self)]"/>
|
||||
@@ -338,9 +338,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="tree_mrs_machine_tool_view">
|
||||
<field name="name">tree.mrs.machine_tool</field>
|
||||
<field name="model">mrs.machine_tool</field>
|
||||
<record model="ir.ui.view" id="tree_sf_machine_tool_view">
|
||||
<field name="name">tree.sf.machine_tool</field>
|
||||
<field name="model">sf.machine_tool</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="机床">
|
||||
<field name="code"/>
|
||||
@@ -353,9 +353,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="mrs_machine_tool_form">
|
||||
<field name="name">form.mrs.machine_tool</field>
|
||||
<field name="model">mrs.machine_tool</field>
|
||||
<record model="ir.ui.view" id="sf_machine_tool_form">
|
||||
<field name="name">form.sf.machine_tool</field>
|
||||
<field name="model">sf.machine_tool</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="机床">
|
||||
<header>
|
||||
@@ -427,10 +427,10 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrs_machine_tool" model="ir.actions.act_window">
|
||||
<record id="action_sf_machine_tool" model="ir.actions.act_window">
|
||||
<field name="name">机床</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.machine_tool</field>
|
||||
<field name="res_model">sf.machine_tool</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<!-- <field name="search_view_id" ref="view_okr_filter"/>-->
|
||||
<field name="help" type="html">
|
||||
@@ -444,9 +444,9 @@
|
||||
|
||||
#------------------控制系统------------------
|
||||
|
||||
<record model="ir.ui.view" id="search_mrs_machine_control_system_view">
|
||||
<field name="name">search.mrs.machine.control_system</field>
|
||||
<field name="model">mrs.machine.control_system</field>
|
||||
<record model="ir.ui.view" id="search_sf_machine_control_system_view">
|
||||
<field name="name">search.sf.machine.control_system</field>
|
||||
<field name="model">sf.machine.control_system</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="控制系统">
|
||||
<field name="name" string="模糊搜索"
|
||||
@@ -455,9 +455,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="tree_mrs_machine_control_system_view">
|
||||
<field name="name">tree.mrs.machine.control_system</field>
|
||||
<field name="model">mrs.machine.control_system</field>
|
||||
<record model="ir.ui.view" id="tree_sf_machine_control_system_view">
|
||||
<field name="name">tree.sf.machine.control_system</field>
|
||||
<field name="model">sf.machine.control_system</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="控制系统">
|
||||
<field name="code"/>
|
||||
@@ -467,9 +467,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="form_mrs_machine_control_system">
|
||||
<field name="name">form.mrs.machine.control_system</field>
|
||||
<field name="model">mrs.machine.control_system</field>
|
||||
<record model="ir.ui.view" id="form_sf_machine_control_system">
|
||||
<field name="name">form.sf.machine.control_system</field>
|
||||
<field name="model">sf.machine.control_system</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="控制系统">
|
||||
<group>
|
||||
@@ -487,10 +487,10 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrs_machine_control_system" model="ir.actions.act_window">
|
||||
<record id="action_sf_machine_control_system" model="ir.actions.act_window">
|
||||
<field name="name">控制系统</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.machine.control_system</field>
|
||||
<field name="res_model">sf.machine.control_system</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
@@ -500,65 +500,4 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
#------------------模型类型------------------
|
||||
|
||||
<record model="ir.ui.view" id="search_sf_model_type_view">
|
||||
<field name="name">search.sf.model.type</field>
|
||||
<field name="model">sf.model.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="模型类型">
|
||||
<field name="name" string="模糊搜索"
|
||||
filter_domain="[('name', 'ilike', self)]"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="tree_sf_model_type_view">
|
||||
<field name="name">tree.sf.model.type</field>
|
||||
<field name="model">sf.model.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="模型类型">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="form_sf_model_type">
|
||||
<field name="name">form.sf.model.type</field>
|
||||
<field name="model">sf.model.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="模型类型">
|
||||
<group>
|
||||
<field name="name" required="1"/>
|
||||
<field name="embryo_tolerance" required="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name='routing_tmpl_ids'>
|
||||
<tree editable='bottom'>
|
||||
<field name="sequence" widget="handle" string="序号"/>
|
||||
<field name="route_workcenter_id" string="工序"/>
|
||||
<field name="routing_type" string="类型"/>
|
||||
<field name="is_repeat" string="重复"/>
|
||||
<field name="workcenter_ids" string="工作中心" widget="many2many_tags" />
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_sf_model_type" model="ir.actions.act_window">
|
||||
<field name="name">模型类型</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.model.type</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
[模型类型] 还没有哦!点左上角的[创建]按钮,沙发归你了!
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<!--加工工艺-->
|
||||
<record model="ir.ui.view" id="mrs_processing_technology_form">
|
||||
<field name="model">mrs.processing.technology</field>
|
||||
<record model="ir.ui.view" id="sf_processing_technology_form">
|
||||
<field name="model">sf.processing.technology</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="加工工艺">
|
||||
|
||||
@@ -27,8 +26,8 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="mrs_processing_technology_tree">
|
||||
<field name="model">mrs.processing.technology</field>
|
||||
<record model="ir.ui.view" id="sf_processing_technology_tree">
|
||||
<field name="model">sf.processing.technology</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="加工工艺">
|
||||
|
||||
@@ -38,9 +37,9 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="search_mrs_processing_technology_view">
|
||||
<field name="name">search.mrs.processing.technology.type</field>
|
||||
<field name="model">mrs.processing.technology</field>
|
||||
<record model="ir.ui.view" id="search_sf_processing_technology_view">
|
||||
<field name="name">search.sf.processing.technology.type</field>
|
||||
<field name="model">sf.processing.technology</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
||||
@@ -49,8 +48,8 @@
|
||||
</field>
|
||||
</record>
|
||||
<!--表面工艺-->
|
||||
<record model="ir.ui.view" id="mrs_production_process_tree">
|
||||
<field name="model">mrs.production.process</field>
|
||||
<record model="ir.ui.view" id="sf_production_process_tree">
|
||||
<field name="model">sf.production.process</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="表面工艺">
|
||||
|
||||
@@ -60,8 +59,8 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="mrs_production_process_form">
|
||||
<field name="model">mrs.production.process</field>
|
||||
<record model="ir.ui.view" id="sf_production_process_form">
|
||||
<field name="model">sf.production.process</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="表面工艺">
|
||||
<group>
|
||||
@@ -92,9 +91,9 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="search_mrs_production_process_view">
|
||||
<field name="name">search.mrs.production.process.type</field>
|
||||
<field name="model">mrs.production.process</field>
|
||||
<record model="ir.ui.view" id="search_sf_production_process_view">
|
||||
<field name="name">search.sf.production.process.type</field>
|
||||
<field name="model">sf.production.process</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
||||
@@ -103,8 +102,8 @@
|
||||
</field>
|
||||
</record>
|
||||
<!--材料型号-->
|
||||
<record model="ir.ui.view" id="mrs_materials_model_form">
|
||||
<field name="model">mrs.materials.model</field>
|
||||
<record model="ir.ui.view" id="sf_materials_model_form">
|
||||
<field name="model">sf.materials.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="材料型号">
|
||||
<group>
|
||||
@@ -132,8 +131,8 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="mrs_materials_model_tree">
|
||||
<field name="model">mrs.materials.model</field>
|
||||
<record model="ir.ui.view" id="sf_materials_model_tree">
|
||||
<field name="model">sf.materials.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="材料型号">
|
||||
<field name="materials_no"/>
|
||||
@@ -144,9 +143,9 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="search_mrs_materials_model_type_view">
|
||||
<field name="name">search.mrs.materials.model.type</field>
|
||||
<field name="model">mrs.materials.model</field>
|
||||
<record model="ir.ui.view" id="search_sf_materials_model_type_view">
|
||||
<field name="name">search.sf.materials.model.type</field>
|
||||
<field name="model">sf.materials.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" string="型号名搜索" filter_domain="[('name','ilike',self)]"/>
|
||||
@@ -159,8 +158,8 @@
|
||||
</field>
|
||||
</record>
|
||||
<!--材料-->
|
||||
<record model="ir.ui.view" id="mrs_production_materials_form">
|
||||
<field name="model">mrs.production.materials</field>
|
||||
<record model="ir.ui.view" id="sf_production_materials_form">
|
||||
<field name="model">sf.production.materials</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="材料">
|
||||
|
||||
@@ -189,8 +188,8 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="mrs_production_materials_tree">
|
||||
<field name="model">mrs.production.materials</field>
|
||||
<record model="ir.ui.view" id="sf_production_materials_tree">
|
||||
<field name="model">sf.production.materials</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="材料">
|
||||
<field name="materials_no" readonly="1"/>
|
||||
@@ -199,9 +198,9 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="search_mrs_production_materials_view">
|
||||
<field name="name">search.mrs.production.materials.type</field>
|
||||
<field name="model">mrs.production.materials</field>
|
||||
<record model="ir.ui.view" id="search_sf_production_materials_view">
|
||||
<field name="name">search.sf.production.materials.type</field>
|
||||
<field name="model">sf.production.materials</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
||||
@@ -210,8 +209,8 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- <record model="ir.ui.view" id="mrs_production_materials_form">-->
|
||||
<!-- <field name="model">mrs.production.materials</field>-->
|
||||
<!-- <record model="ir.ui.view" id="sf_production_materials_form">-->
|
||||
<!-- <field name="model">sf.production.materials</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <form string="材料">-->
|
||||
|
||||
@@ -230,10 +229,10 @@
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="mrs_production_materials" model="ir.actions.act_window">
|
||||
<record id="sf_production_materials" model="ir.actions.act_window">
|
||||
<field name="name">材料</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.production.materials</field>
|
||||
<field name="res_model">sf.production.materials</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
@@ -241,10 +240,10 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="mrs_production_process" model="ir.actions.act_window">
|
||||
<record id="sf_production_process" model="ir.actions.act_window">
|
||||
<field name="name">表面工艺</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.production.process</field>
|
||||
<field name="res_model">sf.production.process</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
@@ -252,10 +251,10 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="mrs_materials_model" model="ir.actions.act_window">
|
||||
<record id="sf_materials_model" model="ir.actions.act_window">
|
||||
<field name="name">材料型号</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.materials.model</field>
|
||||
<field name="res_model">sf.materials.model</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
@@ -263,10 +262,10 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="mrs_processing_technology" model="ir.actions.act_window">
|
||||
<record id="sf_processing_technology" model="ir.actions.act_window">
|
||||
<field name="name">加工工艺</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrs.processing.technology</field>
|
||||
<field name="res_model">sf.processing.technology</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
|
||||
@@ -320,10 +319,10 @@
|
||||
<field name="name">sf.tray.form</field>
|
||||
<field name="model">sf.tray</field>
|
||||
<field name="arch" type="xml">
|
||||
<header>
|
||||
<field name='state' widget="radio" options="{'horizontal': True}"/>
|
||||
</header>
|
||||
<form string="托盘">
|
||||
<header>
|
||||
<field name='state' widget="radio" options="{'horizontal': True}"/>
|
||||
</header>
|
||||
<group string="基本信息" name="group1">
|
||||
<group>
|
||||
<field name="code" required="1"/>
|
||||
@@ -335,8 +334,5 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -16,11 +16,11 @@
|
||||
action="action_mrp_configuration"
|
||||
groups="base.group_system"/>-->
|
||||
<menuitem
|
||||
id="menu_mrs_machine_tool"
|
||||
id="menu_sf_machine_tool"
|
||||
parent="mrp.menu_mrp_configuration"
|
||||
name="机床"
|
||||
sequence="1"
|
||||
action="action_mrs_machine_tool"
|
||||
action="action_sf_machine_tool"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
@@ -34,13 +34,13 @@
|
||||
<menuitem
|
||||
sequence="2"
|
||||
name="基础数据"
|
||||
id="menu_mrs_base"
|
||||
action="mrs_production_materials"
|
||||
id="menu_sf_base"
|
||||
action="sf_production_materials"
|
||||
parent="mrp.menu_mrp_configuration"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_production_materials_1"
|
||||
id="menu_sf_production_materials_1"
|
||||
name="原材料"
|
||||
parent="mrp.menu_mrp_configuration"
|
||||
sequence="3"
|
||||
@@ -48,7 +48,7 @@
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_production_process_1"
|
||||
id="menu_sf_production_process_1"
|
||||
name="工艺"
|
||||
parent="mrp.menu_mrp_configuration"
|
||||
sequence="4"
|
||||
@@ -56,101 +56,90 @@
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_production_process"
|
||||
id="menu_sf_production_process"
|
||||
name="表面工艺"
|
||||
parent="menu_mrs_production_process_1"
|
||||
parent="menu_sf_production_process_1"
|
||||
sequence="1"
|
||||
action="mrs_production_process"
|
||||
action="sf_production_process"
|
||||
/>
|
||||
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_production_materials"
|
||||
id="menu_sf_production_materials"
|
||||
name="材料"
|
||||
parent="menu_mrs_production_materials_1"
|
||||
parent="menu_sf_production_materials_1"
|
||||
sequence="1"
|
||||
action="mrs_production_materials"
|
||||
action="sf_production_materials"
|
||||
|
||||
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_mrs_materials_model"
|
||||
id="menu_sf_materials_model"
|
||||
name="材料型号"
|
||||
parent="menu_mrs_production_materials_1"
|
||||
parent="menu_sf_production_materials_1"
|
||||
sequence="1"
|
||||
action="mrs_materials_model"
|
||||
action="sf_materials_model"
|
||||
|
||||
|
||||
/>
|
||||
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_processing_technology"
|
||||
id="menu_sf_processing_technology"
|
||||
name="加工工艺"
|
||||
parent="menu_mrs_production_process_1"
|
||||
parent="menu_sf_production_process_1"
|
||||
sequence="1"
|
||||
action="mrs_processing_technology"/>
|
||||
action="sf_processing_technology"/>
|
||||
|
||||
<!-- <menuitem-->
|
||||
<!-- id="menu_sf_partner_views"-->
|
||||
<!-- name="工厂token"-->
|
||||
<!-- parent="menu_mrs_base"-->
|
||||
<!-- parent="menu_sf_base"-->
|
||||
<!-- sequence="1"-->
|
||||
<!-- action="token_factory_view"-->
|
||||
<!-- />-->
|
||||
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_machine_brand"
|
||||
parent="menu_mrs_base"
|
||||
id="menu_sf_machine_brand"
|
||||
parent="menu_sf_base"
|
||||
name="品牌"
|
||||
sequence="1"
|
||||
action="action_mrs_machine_brand"/>
|
||||
action="action_sf_machine_brand"/>
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_machine_tool_type"
|
||||
parent="menu_mrs_base"
|
||||
id="menu_sf_machine_tool_type"
|
||||
parent="menu_sf_base"
|
||||
name="机床型号"
|
||||
sequence="1"
|
||||
action="action_mrs_machine_tool_type"/>
|
||||
action="action_sf_machine_tool_type"/>
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_cutting_tool"
|
||||
id="menu_sf_cutting_tool"
|
||||
parent="mrp.menu_mrp_configuration"
|
||||
name="刀具"
|
||||
sequence="5"/>
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_cutting_tool_category"
|
||||
parent="menu_mrs_cutting_tool"
|
||||
id="menu_sf_cutting_tool_category"
|
||||
parent="menu_sf_cutting_tool"
|
||||
name="刀具类别"
|
||||
sequence="1"
|
||||
action="action_mrs_cutting_tool_category"/>
|
||||
action="action_sf_cutting_tool_category"/>
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_cutting_tool_type"
|
||||
parent="menu_mrs_cutting_tool"
|
||||
id="menu_sf_cutting_tool_type"
|
||||
parent="menu_sf_cutting_tool"
|
||||
name="刀具型号"
|
||||
sequence="1"
|
||||
action="action_mrs_cutting_tool_type"/>
|
||||
action="action_sf_cutting_tool_type"/>
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_machine_control_system"
|
||||
parent="menu_mrs_base"
|
||||
id="menu_sf_machine_control_system"
|
||||
parent="menu_sf_base"
|
||||
name="控制系统"
|
||||
sequence="1"
|
||||
action="action_mrs_machine_control_system"/>
|
||||
|
||||
|
||||
<menuitem
|
||||
id="menu_sf_model_type"
|
||||
name="模型类型"
|
||||
parent="mrp.menu_mrp_configuration"
|
||||
sequence="10"
|
||||
action="action_sf_model_type"
|
||||
/>
|
||||
|
||||
|
||||
action="action_sf_machine_control_system"/>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_product_template_form_inherit_sf">
|
||||
<field name="name">product.template.form.inherit.sf</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[last()]" position="after">
|
||||
<page string="加工参数">
|
||||
<group>
|
||||
<group string="模型">
|
||||
<field name="model_long" string="长[mm]"/>
|
||||
<field name="model_width" string="宽[mm]"/>
|
||||
<field name="model_height" string="高[mm]"/>
|
||||
<field name="model_volume" string="体积[mm]"/>
|
||||
<field name="model_type_id" string="模板类型"/>
|
||||
<field name="model_processing_panel" placeholder="例如A,B" string="加工面板"/>
|
||||
<field name="model_precision" string="精度要求"/>
|
||||
<field name="model_materials_id" string="材料"/>
|
||||
<field name="model_materials_type_id" string="型号"
|
||||
domain="[('materials_id', '=', model_materials_id)]"/>
|
||||
</group>
|
||||
<group string="胚料">
|
||||
<field name="embryo_long" string="长[mm]"/>
|
||||
<field name="embryo_width" string="宽[mm]"/>
|
||||
<field name="embryo_height" string="高[mm]"/>
|
||||
<field name="volume" string="体积[mm³]"/>
|
||||
<field name="embryo_materials_id" string="材料"/>
|
||||
<field name="embryo_materials_type_id" string="型号"
|
||||
domain="[('materials_id', '=',embryo_materials_id)]"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_product_category_form_inherit_sf" model="ir.ui.view">
|
||||
<field name="name">product.category.form.inherit.sf</field>
|
||||
<field name="model">product.category</field>
|
||||
<field name="inherit_id" ref="product.product_category_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="parent_id" position="before">
|
||||
<field name="is_embryo"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_sale_order_form_inherit_sf">
|
||||
<field name="name">sale.order.form.inherit.sf</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="payment_term_id" position="after">
|
||||
<field name="deadline_of_delivery"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user