Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修改机床参数bug
This commit is contained in:
@@ -73,7 +73,7 @@ class MrsMaterialModel(models.Model):
|
||||
price = fields.Float('单价/kg')
|
||||
apply = fields.Many2many('material.apply', string='材料应用')
|
||||
materials_code = fields.Char('材料代号')
|
||||
hardness = fields.Float("硬度(hrc)")
|
||||
hardness = fields.Integer("硬度(hrc)")
|
||||
rough_machining = fields.Float("粗加工Vc(m/min)")
|
||||
finish_machining = fields.Float("精加工Vc(m/min)")
|
||||
remark = fields.Text("备注")
|
||||
|
||||
@@ -11,33 +11,33 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
store=True)
|
||||
|
||||
# 整体式刀具参数
|
||||
total_length = fields.Char('总长度(mm)', size=20)
|
||||
total_length = fields.Float('总长度(mm)')
|
||||
blade_number = fields.Selection(
|
||||
[('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8')],
|
||||
string='刃数(个)')
|
||||
neck_diameter = fields.Char('颈部直径(mm)', size=20)
|
||||
neck_length = fields.Char('颈部长度(mm)', size=20)
|
||||
handle_diameter = fields.Char('柄部直径(mm)', size=20)
|
||||
handle_length = fields.Char('柄部长度(mm)', size=20)
|
||||
blade_tip_diameter = fields.Char('刀尖直径(mm)', size=20)
|
||||
neck_diameter = fields.Float('颈部直径(mm)')
|
||||
neck_length = fields.Float('颈部长度(mm)')
|
||||
handle_diameter = fields.Float('柄部直径(mm)')
|
||||
handle_length = fields.Float('柄部长度(mm)')
|
||||
blade_tip_diameter = fields.Integer('刀尖直径(mm)')
|
||||
blade_tip_working_size = fields.Char('刀尖处理尺寸(R半径mm/倒角)', size=20)
|
||||
blade_tip_taper = fields.Integer('刀尖锥度(°)')
|
||||
blade_diameter = fields.Char('刃部直径(mm)', size=20)
|
||||
blade_length = fields.Char('刃部长度(mm)', size=20)
|
||||
blade_diameter = fields.Float('刃部直径(mm)')
|
||||
blade_length = fields.Float('刃部长度(mm)')
|
||||
blade_helix_angle = fields.Integer('刃部螺旋角(°)')
|
||||
blade_width = fields.Char('刃部宽度(mm)', size=20)
|
||||
blade_depth = fields.Char('刃部深度(mm)', size=20)
|
||||
pitch = fields.Char('牙距(mm)', size=20)
|
||||
cutting_depth = fields.Char('切削深度(mm)', size=20)
|
||||
blade_width = fields.Float('刃部宽度(mm)')
|
||||
blade_depth = fields.Float('刃部深度(mm)')
|
||||
pitch = fields.Float('牙距(mm)')
|
||||
cutting_depth = fields.Float('切削深度(mm)')
|
||||
# 刀片参数
|
||||
length = fields.Char('长度(mm)', size=20)
|
||||
thickness = fields.Char('厚度(mm)', size=20)
|
||||
width = fields.Char('宽度(mm)', size=20)
|
||||
cutting_blade_length = fields.Char('切削刃长(mm)', size=20)
|
||||
length = fields.Float('长度(mm)')
|
||||
thickness = fields.Float('厚度(mm)')
|
||||
width = fields.Float('宽度(mm)')
|
||||
cutting_blade_length = fields.Float('切削刃长(mm)')
|
||||
relief_angle = fields.Integer('后角(°)')
|
||||
blade_tip_circular_arc_radius = fields.Char('刀尖圆弧半径(mm)', size=20)
|
||||
inscribed_circle_diameter = fields.Char('内接圆直径(mm)', size=20)
|
||||
install_aperture_diameter = fields.Char('安装孔直径(mm)', size=20)
|
||||
inscribed_circle_diameter = fields.Float('内接圆直径(mm)')
|
||||
install_aperture_diameter = fields.Float('安装孔直径(mm)')
|
||||
chip_breaker_groove = fields.Selection([('无', '无'), ('单面', '单面'), ('双面', '双面')],
|
||||
string='有无断屑槽')
|
||||
blade_teeth_model = fields.Selection(
|
||||
@@ -54,19 +54,22 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
blade_tip_dip_angle = fields.Integer('刀尖倾角(°)')
|
||||
side_cutting_edge_angle = fields.Integer('侧切削角(°)')
|
||||
thread_model = fields.Selection([('无', '无'), ('外螺纹', '外螺纹'), ('内螺纹', '内螺纹')], string='螺纹类型', default='无')
|
||||
thread_num = fields.Char('每英寸螺纹数(tpi)', size=20)
|
||||
thread_num = fields.Float('每英寸螺纹数(tpi)')
|
||||
blade_tip_height_tolerance = fields.Char('刀尖高度公差(mm)', size=20)
|
||||
inscribed_circle_tolerance = fields.Char('内接圆公差(mm)', size=20)
|
||||
thickness_tolerance = fields.Char('厚度公差(mm)', size=20)
|
||||
# 刀杆参数
|
||||
height = fields.Char('高度(mm)', size=20)
|
||||
blade_height = fields.Char('刃部高度(mm)', size=20)
|
||||
cut_depth_max = fields.Char('最大切削深度(mm)', size=20)
|
||||
cutter_arbor_diameter = fields.Char('刀杆直径(mm)', size=20)
|
||||
min_machining_aperture = fields.Char('最小加工孔径(mm)', size=20)
|
||||
install_blade_tip_num = fields.Char('可装刀片数/齿数(个)', size=20)
|
||||
height = fields.Float('高度(mm)')
|
||||
blade_height = fields.Float('刃部高度(mm)')
|
||||
knife_head_height = fields.Float('刀头高度(mm)')
|
||||
knife_head_width = fields.Float('刀头宽度(mm)')
|
||||
knife_head_length = fields.Float('刀头长度(mm)')
|
||||
cut_depth_max = fields.Float('最大切削深度(mm)')
|
||||
cutter_arbor_diameter = fields.Float('刀杆直径(mm)')
|
||||
min_machining_aperture = fields.Integer('最小加工孔径(mm)')
|
||||
install_blade_tip_num = fields.Integer('可装刀片数/齿数(个)')
|
||||
cutting_blade_model = fields.Char('切削类型', size=20)
|
||||
is_cooling_hole = fields.Boolean('有无冷却孔', default=False)
|
||||
is_cooling_hole = fields.Boolean('有无冷却孔')
|
||||
locating_slot_code = fields.Char('定位槽代号', size=20)
|
||||
installing_structure = fields.Char('安装结构', size=20)
|
||||
blade_ids = fields.Many2many(
|
||||
@@ -83,20 +86,20 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
screw = fields.Char('适配螺钉型号', size=50)
|
||||
spanner = fields.Char('适配扳手型号', size=50)
|
||||
# 刀盘参数
|
||||
cutter_head_diameter = fields.Char('刀盘直径(mm)', size=20)
|
||||
interface_diameter = fields.Char('接口直径(mm)', size=20)
|
||||
cutter_head_diameter = fields.Float('刀盘直径(mm)')
|
||||
interface_diameter = fields.Float('接口直径(mm)')
|
||||
# 刀柄参数
|
||||
flange_shank_length = fields.Char('法兰柄长(mm)', size=20)
|
||||
handle_external_diameter = fields.Char('柄部外径(mm)', size=20)
|
||||
handle_inside_diameter = fields.Char('柄部内径(mm)', size=20)
|
||||
min_clamping_diameter = fields.Char('最小夹持直径(mm)', size=20)
|
||||
max_clamping_diameter = fields.Char('最大夹持直径(mm)', size=20)
|
||||
flange_shank_length = fields.Float('法兰柄长(mm)')
|
||||
handle_external_diameter = fields.Float('柄部外径(mm)')
|
||||
handle_inside_diameter = fields.Float('柄部内径(mm)')
|
||||
min_clamping_diameter = fields.Float('最小夹持直径(mm)')
|
||||
max_clamping_diameter = fields.Float('最大夹持直径(mm)')
|
||||
clamping_mode = fields.Char('夹持方式', size=20)
|
||||
max_load_capacity = fields.Char('最大负载能力(kg)', size=20)
|
||||
max_load_capacity = fields.Float('最大负载能力(kg)')
|
||||
taper = fields.Integer('锥度(°)')
|
||||
tool_changing_time = fields.Integer('换刀时间(s)')
|
||||
standard_rotate_speed = fields.Char('标准转速(n/min)', size=20)
|
||||
max_rotate_speed = fields.Char('最大转速(n/min)', size=20)
|
||||
standard_rotate_speed = fields.Integer('标准转速(n/min)')
|
||||
max_rotate_speed = fields.Integer('最大转速(n/min)')
|
||||
diameter_slip_accuracy = fields.Char('径跳精度(mm)', size=20)
|
||||
cooling_model = fields.Char('冷却类型', size=20)
|
||||
is_rough_machining = fields.Boolean('可粗加工', default=False)
|
||||
@@ -106,12 +109,12 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
is_safe_lock = fields.Boolean('有无安全锁', default=False)
|
||||
# 夹头参数
|
||||
er_size_model = fields.Char('ER尺寸型号', size=20)
|
||||
outer_diameter = fields.Char('外径(mm)', size=20)
|
||||
inner_diameter = fields.Char('内径(mm)', size=20)
|
||||
outer_diameter = fields.Float('外径(mm)')
|
||||
inner_diameter = fields.Float('内径(mm)')
|
||||
run_out_accuracy = fields.Char('跳动精度(mm)', size=20)
|
||||
top_diameter = fields.Char('顶部直径(mm)', size=20)
|
||||
weight = fields.Char('重量(kg)', size=20)
|
||||
clamping_length = fields.Char('夹持长度(mm)', size=20)
|
||||
top_diameter = fields.Float('顶部直径(mm)')
|
||||
weight = fields.Float('重量(kg)', size=20)
|
||||
clamping_length = fields.Float('夹持长度(mm)')
|
||||
clamping_tolerance = fields.Char('夹持公差(mm)', size=20)
|
||||
cooling_jacket = fields.Char('适用冷却套型号', size=50)
|
||||
handle_ids = fields.Many2many(
|
||||
@@ -182,11 +185,10 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
'cutting_tool_type': obj['cutting_tool_type'],
|
||||
'height': obj['height'],
|
||||
'width': obj['width'],
|
||||
'blade_height': obj['blade_height'],
|
||||
'total_length': obj['total_length'],
|
||||
'blade_width': obj['blade_width'],
|
||||
'blade_length': obj['blade_length'],
|
||||
'blade_height': obj['blade_height'],
|
||||
'knife_head_height': obj['knife_head_height'],
|
||||
'knife_head_width': obj['knife_head_width'],
|
||||
'knife_head_length': obj['knife_head_length'],
|
||||
'cutter_arbor_diameter': obj['cutter_arbor_diameter'],
|
||||
'main_included_angle': obj['main_included_angle'],
|
||||
'relief_angle': obj['relief_angle'],
|
||||
@@ -297,7 +299,7 @@ class CuttingSpeed(models.Model):
|
||||
slope_milling_angle = fields.Integer('坡铣角度(°)')
|
||||
material_grade = fields.Char('材料牌号')
|
||||
tensile_strength = fields.Char('拉伸强度 (N/mm²)')
|
||||
hardness = fields.Float('硬度(HRC)')
|
||||
hardness = fields.Integer('硬度(HRC)')
|
||||
cutting_speed_n1 = fields.Char('径向切宽 ae=100%D1 ap=1*D1 切削速度Vc')
|
||||
cutting_speed_n2 = fields.Char('径向切宽 ae=50%D1 ap=1.5*D1 切削速度Vc')
|
||||
cutting_speed_n3 = fields.Char('径向切宽 ae=25%D1 ap=L1max 切削速度Vc')
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<field name="name">sf.tool.materials.basic.parameters.tree</field>
|
||||
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="基础参数" delete="0" create="0">
|
||||
<tree string="基础参数" >
|
||||
<field name="total_length" />
|
||||
<field name="blade_number" />
|
||||
<field name="neck_diameter"/>
|
||||
|
||||
@@ -1 +1 @@
|
||||
|
||||
from . import models
|
||||
|
||||
@@ -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,16 +10,12 @@
|
||||
""",
|
||||
'category': 'sf',
|
||||
'website': 'https://www.sf.jikimo.com',
|
||||
'depends': ['mrp', 'base', 'sale', 'sf_manufacturing', 'web_widget_model_viewer', 'mrp_subcontracting',
|
||||
'purchase_stock',
|
||||
'uom', 'jikimo_frontend', 'product'],
|
||||
'depends': ['sf_base', 'web_widget_model_viewer', 'mrp_subcontracting', 'purchase_stock', 'uom', ],
|
||||
'data': [
|
||||
'data/product_data.xml',
|
||||
'data/uom_data.xml',
|
||||
'security/ir.model.access.csv',
|
||||
# 'wizard/cutting_tool_specification_wizard.xml',
|
||||
'views/product_template_view.xml',
|
||||
'views/product_workorder.xml'
|
||||
],
|
||||
'demo': [
|
||||
],
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# from . import product_template
|
||||
from . import product_supplierinfo
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,113 @@
|
||||
from odoo import models
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class ResProductCategory(models.Model):
|
||||
_inherit = "product.category"
|
||||
|
||||
type = fields.Selection(
|
||||
[("成品", "成品"), ("坯料", "坯料"), ("原材料", "原材料"), ("表面工艺", "表面工艺"), ("刀具", "刀具"),
|
||||
("夹具", "夹具"), ("功能刀具", "功能刀具")],
|
||||
default="", string="类型")
|
||||
|
||||
|
||||
class ResProductProduct(models.Model):
|
||||
_inherit = 'product.product'
|
||||
|
||||
single_manufacturing = fields.Boolean(string="单个制造")
|
||||
is_bfm = fields.Boolean('业务平台是否自动创建', default=False)
|
||||
|
||||
|
||||
class ResProducTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
single_manufacturing = fields.Binary('模型文件')
|
||||
|
||||
|
||||
class ResMrpBomMo(models.Model):
|
||||
_inherit = 'mrp.bom'
|
||||
|
||||
subcontractor_id = fields.Many2one('res.partner', string='外包商')
|
||||
|
||||
def bom_create_line_has(self, embryo):
|
||||
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)
|
||||
|
||||
# 业务平台分配工厂后在智能工厂先创建销售订单再创建该产品后再次进行创建bom
|
||||
def bom_create(self, product, bom_type, product_type):
|
||||
bom_id = self.env['mrp.bom'].create({
|
||||
'product_tmpl_id': product.product_tmpl_id.id,
|
||||
'type': bom_type,
|
||||
# 'subcontractor_id': '' or subcontract.partner_id.id,
|
||||
'product_qty': 1,
|
||||
'product_uom_id': 1
|
||||
})
|
||||
if bom_type == 'subcontract' and product_type is not False:
|
||||
subcontract = self.get_supplier(product.materials_type_id)
|
||||
bom_id.subcontractor_id = subcontract.partner_id.id
|
||||
return bom_id
|
||||
|
||||
# 坯料BOM组件:选取当前坯料原材料,
|
||||
# 然后根据当前的坯料的体积得出需要的原材料重量(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
||||
# 坯料所需原材料公式:当前的坯料的体积(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
||||
|
||||
def bom_create_line(self, embryo):
|
||||
# 选取当前坯料原材料
|
||||
raw_bom_line = self.get_raw_bom(embryo)
|
||||
if raw_bom_line:
|
||||
qty = 1
|
||||
if round(embryo.volume * raw_bom_line.materials_type_id.density / 1000000) > 1:
|
||||
qty = round(embryo.volume * raw_bom_line.materials_type_id.density / 1000000)
|
||||
bom_line = self.env['mrp.bom.line'].create({
|
||||
'bom_id': self.id,
|
||||
'product_id': raw_bom_line.id,
|
||||
'product_tmpl_id': raw_bom_line.product_tmpl_id.id,
|
||||
'product_qty': qty,
|
||||
'product_uom_id': raw_bom_line.uom_id.id,
|
||||
})
|
||||
return bom_line
|
||||
else:
|
||||
return False
|
||||
|
||||
# 查询材料型号默认排第一的供应商
|
||||
|
||||
def get_supplier(self, materials_type):
|
||||
seller_id = self.env['sf.supplier.sort'].search(
|
||||
[('materials_model_id', '=', materials_type.id)],
|
||||
limit=1,
|
||||
order='sequence asc')
|
||||
return seller_id
|
||||
|
||||
# 匹配bom
|
||||
|
||||
def get_bom(self, product):
|
||||
embryo_has = self.env['product.product'].search(
|
||||
[('categ_id.type', '=', '坯料'), ('materials_type_id', '=', product.materials_type_id.id),
|
||||
('length', '>', product.length), ('width', '>', product.width),
|
||||
('height', '>', product.height), ('is_bfm', '=', False)
|
||||
],
|
||||
limit=1,
|
||||
order='volume desc'
|
||||
)
|
||||
logging.info('get_bom-vals:%s' % embryo_has)
|
||||
if embryo_has:
|
||||
rate_of_waste = ((embryo_has.volume - product.model_volume) % embryo_has.volume) * 100
|
||||
if rate_of_waste <= 20:
|
||||
return embryo_has
|
||||
else:
|
||||
return
|
||||
|
||||
# 查bom的原材料
|
||||
def get_raw_bom(self, product):
|
||||
raw_bom = self.env['product.product'].search(
|
||||
[('categ_id.type', '=', '原材料'), ('materials_type_id', '=', product.materials_type_id.id)])
|
||||
return raw_bom
|
||||
|
||||
|
||||
class ResSupplierInfo(models.Model):
|
||||
|
||||
@@ -1,407 +0,0 @@
|
||||
from odoo import models, fields, api
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.modules import get_resource_path
|
||||
from OCC.Extend.DataExchange import read_step_file
|
||||
from OCC.Extend.DataExchange import write_stl_file
|
||||
import logging
|
||||
import base64
|
||||
import hashlib
|
||||
import os
|
||||
|
||||
|
||||
# class ResProduct(models.Model):
|
||||
# _inherit = 'product.template'
|
||||
|
||||
# image_1920 = fields.Image(related='cutting_tool_parameter_image', store=True,
|
||||
# domain=[('cutting_tool_parameter_image', '!=', False)])
|
||||
|
||||
# @api.constrains('cutting_tool_parameter_length',)
|
||||
# def _check_length_or_width(self):
|
||||
# for record in self:
|
||||
# if record.cutting_tool == '刀片':
|
||||
# if record.cutting_tool_parameter_length <= 0 \
|
||||
# and record.cutting_tool_parameter_width <= 0:
|
||||
# raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
#
|
||||
#
|
||||
# @api.constrains('cutting_tool_parameter_length',
|
||||
# 'cutting_tool_parameter_width')
|
||||
# def _check_length_or_width(self):
|
||||
# for record in self:
|
||||
# if record.cutting_tool == '刀片':
|
||||
# if record.cutting_tool_parameter_length <= 0 \
|
||||
# and record.cutting_tool_parameter_width <= 0:
|
||||
# raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
# # if self.cutting_tool == '刀片':
|
||||
# # if self.cutting_tool_parameter_length == 0 \
|
||||
# # or self.cutting_tool_parameter_width == 0:
|
||||
# # raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
#
|
||||
# @api.constrains('cutting_tool_parameter_height')
|
||||
# def _check_height(self):
|
||||
# if self.cutting_tool == '刀片':
|
||||
# if self.cutting_tool_parameter_height <= 0:
|
||||
# raise ValueError('该产品中高度不能为零,请确认并重新输入!')
|
||||
#
|
||||
# @api.constrains('cutting_tool_parameter_top_angle')
|
||||
# def _check_top_angle(self):
|
||||
# if self.cutting_tool == '刀片':
|
||||
# if self.cutting_tool_parameter_top_angle <= 0:
|
||||
# raise ValueError('该产品中顶角不能为零,请确认并重新输入!')
|
||||
#
|
||||
# @api.constrains('cutting_tool_parameter_r_angle')
|
||||
# def _check_r_angle(self):
|
||||
# if self.cutting_tool == '刀片':
|
||||
# if self.cutting_tool_parameter_r_angle <= 0:
|
||||
# raise ValueError('该产品中R角不能为零,请确认并重新输入!')
|
||||
#
|
||||
# @api.constrains('cutting_tool_parameter_radius')
|
||||
# def _check_radius(self):
|
||||
# if self.cutting_tool == '刀片':
|
||||
# if self.cutting_tool_parameter_radius <= 0:
|
||||
# raise ValueError('该产品中刀尖半径不能为零,请确认并重新输入!')
|
||||
#
|
||||
# @api.constrains('cutting_tool_parameter_handle_length',
|
||||
# 'cutting_tool_parameter_length1',
|
||||
# 'cutting_tool_parameter_diameter1')
|
||||
# # 'cutting_tool_parameter_body_accuracy',
|
||||
# # 'cutting_tool_parameter_detection_accuracy',
|
||||
# # 'cutting_tool_parameter_detection_hardness')
|
||||
# def _check_handle(self):
|
||||
# for record in self:
|
||||
# if record.cutting_tool == '刀柄':
|
||||
# if record.cutting_tool_parameter_handle_length == 0 \
|
||||
# or record.cutting_tool_parameter_diameter1 == 0 \
|
||||
# or record.cutting_tool_parameter_length1 == 0:
|
||||
# # or record.cutting_tool_parameter_detection_accuracy == 0 \
|
||||
# # or record.cutting_tool_parameter_detection_hardness == 0 \
|
||||
# # or record.cutting_tool_parameter_body_accuracy == 0:
|
||||
# raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
# # if self.cutting_tool == '刀柄':
|
||||
# # if self.cutting_tool_parameter_handle_length == 0 \
|
||||
# # or self.cutting_tool_parameter_diameter1 == 0 \
|
||||
# # or self.cutting_tool_parameter_length1 == 0 \
|
||||
# # or self.cutting_tool_parameter_detection_accuracy == 0 \
|
||||
# # or self.cutting_tool_parameter_detection_hardness == 0 \
|
||||
# # or self.cutting_tool_parameter_body_accuracy == 0:
|
||||
# # raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
#
|
||||
# @api.constrains('cutting_tool_parameter_weight')
|
||||
# def _check_weight(self):
|
||||
# if self.cutting_tool == '刀柄':
|
||||
# if self.cutting_tool_parameter_weight == 0:
|
||||
# raise ValueError('该产品中重量不能为零,请确认并重新输入!')
|
||||
|
||||
# @api.constrains('cutting_tool_parameter_c_diameter',
|
||||
# 'cutting_tool_parameter_l_total_length',
|
||||
# 'cutting_tool_parameter_d_diameter',
|
||||
# 'cutting_tool_parameter_wrench',
|
||||
# 'cutting_tool_parameter_screw',
|
||||
# 'cutting_tool_parameter_rounded_corner',
|
||||
# 'cutting_tool_parameter_hardness')
|
||||
# def _check_angle(self):
|
||||
# if self.cutting_tool in ['刀杆', '刀盘']:
|
||||
# if self.cutting_tool_parameter_c_diameter == 0 \
|
||||
# or self.cutting_tool_parameter_l_total_length == 0 \
|
||||
# or self.cutting_tool_parameter_d_diameter == 0 \
|
||||
# or self.cutting_tool_parameter_wrench == 0 \
|
||||
# or self.cutting_tool_parameter_screw == 0 \
|
||||
# or self.cutting_tool_parameter_rounded_corner == 0 \
|
||||
# or self.cutting_tool_parameter_hardness:
|
||||
# raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
|
||||
# @api.constrains('cutting_tool_parameter_c_diameter',
|
||||
# 'cutting_tool_parameter_l_total_length',
|
||||
# 'cutting_tool_parameter_diameter1')
|
||||
# def _check_angle(self):
|
||||
# for record in self:
|
||||
# if record.cutting_tool == '整体式刀具' or record.cutting_tool == '刀片':
|
||||
# if record.cutting_tool_parameter_c_diameter == 0 \
|
||||
# or record.cutting_tool_parameter_l_total_length == 0 \
|
||||
# or record.cutting_tool_parameter_diameter1 == 0:
|
||||
# raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
|
||||
# @api.constrains('cutting_tool_parameter_outer_diameter',
|
||||
# 'cutting_tool_parameter_inner_diameter',
|
||||
# 'cutting_tool_parameter_body_accuracy',
|
||||
# 'cutting_tool_parameter_handle_length',
|
||||
# 'cutting_tool_parameter_length1',
|
||||
# 'cutting_tool_parameter_diameter1')
|
||||
# def _check_angle(self):
|
||||
# for record in self:
|
||||
# if record.cutting_tool == '整体式刀具' or record.cutting_tool == '刀片':
|
||||
# if record.cutting_tool_parameter_front_angle == 0 \
|
||||
# or record.cutting_tool_parameter_rear_angle == 0 \
|
||||
# or record.cutting_tool_parameter_main_included_angle == 0:
|
||||
# raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
|
||||
# @api.constrains('cutting_tool_parameter_front_angle',
|
||||
# 'cutting_tool_parameter_rear_angle',
|
||||
# 'cutting_tool_parameter_main_included_angle')
|
||||
# def _check_angle(self):
|
||||
# for record in self:
|
||||
# if record.cutting_tool == '整体式刀具' or record.cutting_tool == '刀片':
|
||||
# if record.cutting_tool_parameter_front_angle <= 0 \
|
||||
# or record.cutting_tool_parameter_rear_angle <= 0 \
|
||||
# or record.cutting_tool_parameter_main_included_angle <= 0:
|
||||
# raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
#
|
||||
# @api.constrains('cutting_tool_parameter_total_length',
|
||||
# 'cutting_tool_parameter_shank_length',
|
||||
# 'cutting_tool_parameter_blade_length',
|
||||
# 'cutting_tool_parameter_diameter')
|
||||
# def _check_length(self):
|
||||
# for record in self:
|
||||
# if record.cutting_tool == '整体式刀具':
|
||||
# if record.cutting_tool_parameter_total_length <= 0 \
|
||||
# or record.cutting_tool_parameter_shank_length <= 0 \
|
||||
# or record.cutting_tool_parameter_blade_length <= 0 \
|
||||
# or record.cutting_tool_parameter_diameter <= 0:
|
||||
# raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
|
||||
# @api.constrains('cutting_tool_parameter_total_length',
|
||||
# 'cutting_tool_parameter_shank_length',
|
||||
# 'cutting_tool_parameter_blade_length',
|
||||
# 'cutting_tool_parameter_diameter')
|
||||
# def _check_length(self):
|
||||
# for record in self:
|
||||
# if record.cutting_tool == '整体式刀具':
|
||||
# if record.cutting_tool_parameter_total_length == 0 \
|
||||
# or record.cutting_tool_parameter_shank_length == 0 \
|
||||
# or record.cutting_tool_parameter_blade_length == 0 \
|
||||
# or record.cutting_tool_parameter_diameter == 0:
|
||||
# raise ValueError('该产品中有字段不能为零,请确认并重新输入!')
|
||||
|
||||
# @api.constrains('cutting_tool_parameter_blade_number')
|
||||
# def _check_blade_number(self):
|
||||
# if self.cutting_tool in ['整体式刀具', '刀杆', '刀盘']:
|
||||
# if self.cutting_tool_parameter_blade_number <= 0:
|
||||
# raise ValueError('该产品中刃数不能为零,请确认并重新输入!')
|
||||
#
|
||||
# @api.constrains('cutting_tool_parameter_nut')
|
||||
# def _check_nut(self):
|
||||
# if self.cutting_tool in ['整体式刀具', '刀片', '刀柄', '夹头']:
|
||||
# if self.cutting_tool_parameter_nut <= 0:
|
||||
# raise ValueError('该产品中配对螺母不能为零,请确认并重新输入!')
|
||||
|
||||
|
||||
# @api.onchange('cutting_tool_material_id')
|
||||
# def _get_cutting_tool_material_info(self):
|
||||
# for item in self:
|
||||
# if self.cutting_tool_type == '整体式刀具':
|
||||
# item.cutting_tool_parameter_brand_id = item.cutting_tool_model_id.brand.id
|
||||
# item.cutting_tool_parameter_total_length = item.cutting_tool_model_id.total_length
|
||||
# item.cutting_tool_parameter_shank_length = item.cutting_tool_model_id.shank_length
|
||||
# item.cutting_tool_parameter_blade_length = item.cutting_tool_model_id.blade_length
|
||||
# item.cutting_tool_parameter_diameter = item.cutting_tool_model_id.diameter
|
||||
# item.cutting_tool_parameter_nut = item.cutting_tool_model_id.nut
|
||||
# item.cutting_tool_parameter_blade_number = item.cutting_tool_model_id.blade_number
|
||||
# item.cutting_tool_parameter_material_model_id = item.cutting_tool_model_id.material_model.id
|
||||
# item.cutting_tool_parameter_front_angle = item.cutting_tool_model_id.front_angle
|
||||
# item.cutting_tool_parameter_rear_angle = item.cutting_tool_model_id.rear_angle
|
||||
# item.cutting_tool_parameter_main_included_angle = item.cutting_tool_model_id.main_included_angle
|
||||
# item.cutting_tool_parameter_chuck_model_ids = self._get_ids(
|
||||
# item.cutting_tool_model_id.chuck_model)
|
||||
# item.cutting_tool_parameter_scope = item.cutting_tool_model_id.scope
|
||||
# item.image_1920 = '' if not item.cutting_tool_model_id.image else item.cutting_tool_model_id.image
|
||||
# elif self.cutting_tool_type == '刀片':
|
||||
# item.cutting_tool_parameter_brand_id = item.cutting_tool_model_id.brand.id
|
||||
# item.cutting_tool_parameter_top_angle = item.cutting_tool_model_id.top_angle
|
||||
# item.cutting_tool_parameter_front_angle = item.cutting_tool_model_id.front_angle
|
||||
# item.cutting_tool_parameter_rear_angle = item.cutting_tool_model_id.rear_angle
|
||||
# item.cutting_tool_parameter_main_included_angle = item.cutting_tool_model_id.main_included_angle
|
||||
# item.cutting_tool_parameter_r_angle = item.cutting_tool_model_id.r_angle
|
||||
# item.cutting_tool_parameter_working_hardness = item.cutting_tool_model_id.hardness
|
||||
# item.cutting_tool_parameter_material_model_id = item.cutting_tool_model_id.material_model.id
|
||||
# item.cutting_tool_parameter_length = item.cutting_tool_model_id.length
|
||||
# item.cutting_tool_parameter_width = item.cutting_tool_model_id.width
|
||||
# item.cutting_tool_parameter_height = item.cutting_tool_model_id.height
|
||||
# item.cutting_tool_parameter_radius = item.cutting_tool_model_id.radius
|
||||
# item.cutting_tool_parameter_nut = item.cutting_tool_model_id.nut
|
||||
# item.cutting_tool_parameter_cutter_bar_ids = self._get_ids(item.cutting_tool_model_id.cutter_bar)
|
||||
# item.cutting_tool_parameter_cutter_pad_ids = self._get_ids(item.cutting_tool_model_id.cutter_pad)
|
||||
# item.image_1920 = '' if not item.cutting_tool_model_id.image else item.cutting_tool_model_id.image
|
||||
# elif self.cutting_tool_type == '刀杆':
|
||||
# item.cutting_tool_parameter_brand_id = item.cutting_tool_model_id.brand.id
|
||||
# item.cutting_tool_parameter_c_diameter = item.cutting_tool_model_id.c_diameter
|
||||
# item.cutting_tool_parameter_d_diameter = item.cutting_tool_model_id.d_diameter
|
||||
# item.cutting_tool_parameter_l_total_length = item.cutting_tool_model_id.total_length
|
||||
# item.cutting_tool_parameter_wrench = item.cutting_tool_model_id.wrench
|
||||
# item.cutting_tool_parameter_screw = item.cutting_tool_model_id.screw
|
||||
# item.cutting_tool_parameter_blade_ids = self._get_ids(item.cutting_tool_model_id.blade)
|
||||
# item.cutting_tool_parameter_scope = item.cutting_tool_model_id.scope
|
||||
# item.cutting_tool_parameter_material_model_id = item.cutting_tool_model_id.material_model.id
|
||||
# item.cutting_tool_parameter_rounded_corner = item.cutting_tool_model_id.radius
|
||||
# item.cutting_tool_parameter_accuracy_level = item.cutting_tool_model_id.accuracy
|
||||
# item.cutting_tool_parameter_blade_number = item.cutting_tool_model_id.blade_number
|
||||
# item.cutting_tool_parameter_hardness = item.cutting_tool_model_id.hardness
|
||||
# item.image_1920 = '' if not item.cutting_tool_model_id.image else item.cutting_tool_model_id.image
|
||||
# elif self.cutting_tool_type == '刀盘':
|
||||
# item.cutting_tool_parameter_brand_id = item.cutting_tool_model_id.brand.id
|
||||
# item.cutting_tool_parameter_c_diameter = item.cutting_tool_model_id.c_diameter
|
||||
# item.cutting_tool_parameter_d_diameter = item.cutting_tool_model_id.d_diameter
|
||||
# item.cutting_tool_parameter_l_total_length = item.cutting_tool_model_id.total_length
|
||||
# item.cutting_tool_parameter_wrench = item.cutting_tool_model_id.wrench
|
||||
# item.cutting_tool_parameter_screw = item.cutting_tool_model_id.screw
|
||||
# item.cutting_tool_parameter_blade_ids = item.cutting_tool_model_id.blade.id
|
||||
# item.cutting_tool_parameter_scope = item.cutting_tool_model_id.scope
|
||||
# item.cutting_tool_parameter_material_model_id = item.cutting_tool_model_id.material_model.id
|
||||
# item.cutting_tool_parameter_rounded_corner = item.cutting_tool_model_id.radius
|
||||
# item.cutting_tool_parameter_accuracy_level = item.cutting_tool_model_id.accuracy
|
||||
# item.cutting_tool_parameter_blade_number = item.cutting_tool_model_id.blade_number
|
||||
# item.cutting_tool_parameter_hardness = item.cutting_tool_model_id.hardness
|
||||
# item.image_1920 = '' if not item.cutting_tool_model_id.image else item.cutting_tool_model_id.image
|
||||
# elif self.cutting_tool_type == '刀柄':
|
||||
# item.cutting_tool_parameter_brand_id = item.cutting_tool_model_id.brand.id
|
||||
# item.cutting_tool_parameter_handle_length = item.cutting_tool_model_id.length
|
||||
# item.cutting_tool_parameter_length1 = item.cutting_tool_model_id.length1
|
||||
# item.cutting_tool_parameter_diameter1 = item.cutting_tool_model_id.diameter1
|
||||
# item.cutting_tool_parameter_body_accuracy = item.cutting_tool_model_id.body_accuracy
|
||||
# item.cutting_tool_parameter_nut = item.cutting_tool_model_id.nut
|
||||
# item.cutting_tool_parameter_clamping_range = item.cutting_tool_model_id.clamping_range
|
||||
# item.cutting_tool_parameter_weight = item.cutting_tool_model_id.weight
|
||||
# item.cutting_tool_parameter_material_model_id = item.cutting_tool_model_id.material_model.id
|
||||
# item.cutting_tool_parameter_chuck_model_ids = self._get_ids(item.cutting_tool_model_id.chuck_model)
|
||||
# item.cutting_tool_parameter_detection_accuracy = item.cutting_tool_model_id.detection_accuracy
|
||||
# item.cutting_tool_parameter_detection_hardness = item.cutting_tool_model_id.detection_hardness
|
||||
# item.cutting_tool_parameter_standard_speed = item.cutting_tool_model_id.standard_speed
|
||||
# item.image_1920 = '' if not item.cutting_tool_model_id.image else item.cutting_tool_model_id.image
|
||||
# elif self.cutting_tool_type == '夹头':
|
||||
# item.cutting_tool_parameter_brand_id = item.cutting_tool_model_id.brand.id
|
||||
# item.cutting_tool_parameter_outer_diameter = item.cutting_tool_model_id.diameter
|
||||
# item.cutting_tool_parameter_inner_diameter = item.cutting_tool_model_id.inner_diameter
|
||||
# item.cutting_tool_parameter_accuracy = item.cutting_tool_model_id.accuracy
|
||||
# item.cutting_tool_parameter_nut = item.cutting_tool_model_id.nut
|
||||
# item.cutting_tool_parameter_clamping_range = item.cutting_tool_model_id.clamping_range
|
||||
# item.cutting_tool_parameter_handle_model_ids = self._get_ids(item.cutting_tool_model_id.handle_model)
|
||||
# item.cutting_tool_parameter_material_model_id = item.cutting_tool_model_id.material_model.id
|
||||
# item.cutting_tool_parameter_height = item.cutting_tool_model_id.height
|
||||
# item.cutting_tool_parameter_feature = item.cutting_tool_model_id.feature
|
||||
# item.image_1920 = '' if not item.cutting_tool_model_id.image else item.cutting_tool_model_id.image
|
||||
# else:
|
||||
# item.cutting_tool_parameter_brand_id = False
|
||||
# item.cutting_tool_parameter_total_length = False
|
||||
# item.cutting_tool_parameter_shank_length = False
|
||||
# item.cutting_tool_parameter_blade_length = False
|
||||
# item.cutting_tool_parameter_diameter = False
|
||||
# item.cutting_tool_parameter_nut = False
|
||||
# item.cutting_tool_parameter_blade_number = False
|
||||
# item.cutting_tool_parameter_material_model_id = False
|
||||
# item.cutting_tool_parameter_front_angle = False
|
||||
# item.cutting_tool_parameter_rear_angle = False
|
||||
# item.cutting_tool_parameter_main_included_angle = False
|
||||
# item.cutting_tool_parameter_chuck_model_ids = False
|
||||
# item.cutting_tool_parameter_scope = False
|
||||
# item.cutting_tool_parameter_top_angle = False
|
||||
# item.cutting_tool_parameter_r_angle = False
|
||||
# item.cutting_tool_parameter_working_hardness = False
|
||||
# item.cutting_tool_parameter_length = False
|
||||
# item.cutting_tool_parameter_width = False
|
||||
# item.cutting_tool_parameter_height = False
|
||||
# item.cutting_tool_parameter_radius = False
|
||||
# item.cutting_tool_parameter_cutter_bar_ids = False
|
||||
# item.cutting_tool_parameter_cutter_pad_ids = False
|
||||
# item.cutting_tool_parameter_c_diameter = False
|
||||
# item.cutting_tool_parameter_d_diameter = False
|
||||
# item.cutting_tool_parameter_l_total_length = False
|
||||
# item.cutting_tool_parameter_wrench = False
|
||||
# item.cutting_tool_parameter_screw = False
|
||||
# item.cutting_tool_parameter_blade_ids = False
|
||||
# item.cutting_tool_parameter_rounded_corner = False
|
||||
# item.cutting_tool_parameter_accuracy_level = False
|
||||
# item.cutting_tool_parameter_hardness = False
|
||||
# item.cutting_tool_parameter_handle_length = False
|
||||
# item.cutting_tool_parameter_length1 = False
|
||||
# item.cutting_tool_parameter_diameter1 = False
|
||||
# item.cutting_tool_parameter_body_accuracy = False
|
||||
# item.cutting_tool_parameter_clamping_range = False
|
||||
# item.cutting_tool_parameter_weight = False
|
||||
# item.cutting_tool_parameter_detection_accuracy = False
|
||||
# item.cutting_tool_parameter_detection_hardness = False
|
||||
# item.cutting_tool_parameter_standard_speed = False
|
||||
# item.image_1920 = False
|
||||
|
||||
|
||||
class ResMrpBom(models.Model):
|
||||
_inherit = 'mrp.bom'
|
||||
|
||||
def bom_create_line_has(self, embryo):
|
||||
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)
|
||||
|
||||
# 业务平台分配工厂后在智能工厂先创建销售订单再创建该产品后再次进行创建bom
|
||||
def bom_create(self, product, bom_type, product_type):
|
||||
bom_id = self.env['mrp.bom'].create({
|
||||
'product_tmpl_id': product.product_tmpl_id.id,
|
||||
'type': bom_type,
|
||||
# 'subcontractor_id': '' or subcontract.partner_id.id,
|
||||
'product_qty': 1,
|
||||
'product_uom_id': 1
|
||||
})
|
||||
if bom_type == 'subcontract' and product_type is not False:
|
||||
subcontract = self.get_supplier(product.materials_type_id)
|
||||
bom_id.subcontractor_id = subcontract.partner_id.id
|
||||
return bom_id
|
||||
|
||||
# 坯料BOM组件:选取当前坯料原材料,
|
||||
# 然后根据当前的坯料的体积得出需要的原材料重量(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
||||
# 坯料所需原材料公式:当前的坯料的体积(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
||||
def bom_create_line(self, embryo):
|
||||
# 选取当前坯料原材料
|
||||
raw_bom_line = self.get_raw_bom(embryo)
|
||||
if raw_bom_line:
|
||||
bom_line = self.env['mrp.bom.line'].create({
|
||||
'bom_id': self.id,
|
||||
'product_id': raw_bom_line.id,
|
||||
'product_tmpl_id': raw_bom_line.product_tmpl_id.id,
|
||||
'product_qty': round(embryo.volume * raw_bom_line.materials_type_id.density / 1000000),
|
||||
'product_uom_id': raw_bom_line.uom_id.id,
|
||||
})
|
||||
return bom_line
|
||||
else:
|
||||
return False
|
||||
|
||||
# 查询材料型号默认排第一的供应商
|
||||
def get_supplier(self, materials_type):
|
||||
seller_id = self.env['sf.supplier.sort'].search(
|
||||
[('materials_model_id', '=', materials_type.id)],
|
||||
limit=1,
|
||||
order='sequence asc')
|
||||
return seller_id
|
||||
|
||||
# 匹配bom
|
||||
def get_bom(self, product):
|
||||
embryo_has = self.env['product.product'].search(
|
||||
[('categ_id.type', '=', '坯料'), ('materials_type_id', '=', product.materials_type_id.id),
|
||||
('length', '>', product.length), ('width', '>', product.width),
|
||||
('height', '>', product.height), ('is_bfm', '=', False)
|
||||
],
|
||||
limit=1,
|
||||
order='volume desc'
|
||||
)
|
||||
logging.info('get_bom-vals:%s' % embryo_has)
|
||||
if embryo_has:
|
||||
rate_of_waste = ((embryo_has.volume - product.model_volume) % embryo_has.volume) * 100
|
||||
if rate_of_waste <= 20:
|
||||
return embryo_has
|
||||
else:
|
||||
return
|
||||
|
||||
# 查bom的原材料
|
||||
def get_raw_bom(self, product):
|
||||
raw_bom = self.env['product.product'].search(
|
||||
[('categ_id.type', '=', '原材料'), ('materials_type_id', '=', product.materials_type_id.id)])
|
||||
return raw_bom
|
||||
|
||||
# @api.constrains('type')
|
||||
# def _check_type(self):
|
||||
# category = self.env['product.category'].search(
|
||||
# [('type', '=', self.type)])
|
||||
# if category:
|
||||
# raise ValidationError("该类别已存在,请选择其他类别")
|
||||
@@ -1,559 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- <record model="ir.ui.view" id="view_product_template_only_form_inherit_sf">-->
|
||||
<!-- <field name="name">product.template.only.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">-->
|
||||
<!-- <field name="barcode" position="replace">-->
|
||||
<!-- <field name='barcode' invisible="1"/>-->
|
||||
<!-- </field>-->
|
||||
<!-- <field name="default_code" position="replace">-->
|
||||
<!-- <field name='default_code' invisible="1"/>-->
|
||||
<!-- </field>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<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="sale.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//label[@for='list_price']" position="before">
|
||||
<field name='categ_type' invisible="1"/>
|
||||
<field name="upload_model_file"
|
||||
widget="many2many_binary"
|
||||
attrs="{'invisible': ['|', ('categ_type', '!=', '成品'),('categ_type', '=', False)]}"/>
|
||||
<field name="model_file" widget="Viewer3D" string="模型" readonly="1" force_save="1"
|
||||
attrs="{'invisible': ['|','|', ('categ_type', '!=', '成品'),('categ_type', '=', False),('model_file', '=', False)]}"/>
|
||||
</xpath>
|
||||
<field name="categ_id" position="replace">
|
||||
<field name='categ_id' invisible="1"/>
|
||||
</field>
|
||||
<field name="product_tag_ids" position="after">
|
||||
<field name="default_code" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
|
||||
<field name="barcode" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
|
||||
</field>
|
||||
<field name="invoice_policy" position="after">
|
||||
<field name='categ_id'/>
|
||||
<field name='cutting_tool_type' invisible="1"/>
|
||||
<field name="fixture_material_type" invisible="1"/>
|
||||
<field name="embryo_model_type_id" string="模型类型"
|
||||
attrs="{'invisible': ['|',('categ_type', '!=', '坯料'),('categ_type', '=', False)]}"/>
|
||||
<field name="materials_id" string="材料" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])]}"/>
|
||||
<field name="materials_type_id" string="型号" placeholder="请选择"
|
||||
domain="[('materials_id', '=', materials_id)]"
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])]}"/>
|
||||
<field name="server_product_process_parameters_id" string="表面工艺参数"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': ['|',('categ_type', '!=', '表面工艺'),('categ_type', '=', False)]}"/>
|
||||
<field name="cutting_tool_material_id" attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
||||
placeholder="请选择"/>
|
||||
<field name="cutting_tool_model_id" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
||||
domain="[('cutting_tool_material_id','=',cutting_tool_material_id)]"/>
|
||||
<!-- <lable for="specification_id" class="type_label">规格</lable>-->
|
||||
<!-- <div class="button_width">-->
|
||||
<field name="specification_id" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
||||
domain="[('standard_library_id','=',cutting_tool_model_id)]"/>
|
||||
<!-- <button name="choice" type="object" class="oe_highlight">选择</button>-->
|
||||
<!-- </div>-->
|
||||
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||
placeholder="请选择"/>
|
||||
<!-- <field name="fixture_model_id" string="型号" placeholder="请选择"-->
|
||||
<!-- context="{'default_fixture_material_id': fixture_material_id,'default_multi_mounting_type_id': fixture_multi_mounting_type_id}"-->
|
||||
<!-- attrs="{'invisible': [('categ_type', '!=', '夹具')]}"-->
|
||||
<!-- domain="[('fixture_material_id','=',fixture_material_id)]"/>-->
|
||||
</field>
|
||||
|
||||
<xpath expr="//label[@for='volume']" position="before">
|
||||
<label for="length" string="尺寸"
|
||||
attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>
|
||||
<div class="o_address_format"
|
||||
attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}">
|
||||
<label for="length" string="长"/>
|
||||
<field name="length" class="o_address_zip"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="width" string="宽"/>
|
||||
<field name="width" class="o_address_zip"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="height" string="高"/>
|
||||
<field name="height" class="o_address_zip"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//page[last()]" position="after">
|
||||
<page string="加工参数">
|
||||
<group>
|
||||
<group string="模型">
|
||||
<label for="model_long" string="尺寸[mm]"/>
|
||||
<div class="o_address_format">
|
||||
<label for="model_long" string="长"/>
|
||||
<field name="model_long" class="o_address_zip"/>
|
||||
<label for="model_width" string="宽"/>
|
||||
<field name="model_width" class="o_address_zip"/>
|
||||
<label for="model_height" string="高"/>
|
||||
<field name="model_height" class="o_address_zip"/>
|
||||
</div>
|
||||
<field name="model_volume" string="体积[mm³]"/>
|
||||
<field name="product_model_type_id" string="模型类型"/>
|
||||
<field name="model_processing_panel" placeholder="例如R,U" string="加工面板"/>
|
||||
<field name="model_machining_precision"/>
|
||||
<field name="model_process_parameters_ids" string="表面工艺参数" widget="many2many_tags"
|
||||
options="{'no_create': True}"/>
|
||||
<field name="model_remark" string="备注说明"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
<!-- <xpath expr="//page[@name='general_information']" position="after">-->
|
||||
<!-- <page string="刀具物料参数" attrs="{'invisible': [('categ_type', '!=', '刀具')]}">-->
|
||||
<!-- </page>-->
|
||||
<!-- </xpath>-->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_product_template_only_form_inherit_sf">
|
||||
<field name="name">product.template.only.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">
|
||||
<field name="barcode" position="replace">
|
||||
<field name='barcode' invisible="1"/>
|
||||
</field>
|
||||
<field name="default_code" position="replace">
|
||||
<field name='default_code' invisible="1"/>
|
||||
</field>
|
||||
<xpath expr="//page[@name='variants']" position="before">
|
||||
<page string="刀具物料参数" attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
|
||||
<group>
|
||||
<group attrs="{'invisible': [('categ_type', '!=', '刀具')]}" col="1">
|
||||
<field name="cutting_tool_type_id" options="{'no_create': True}" placeholder="请选择"/>
|
||||
<field name="brand_id" options="{'no_create': True}" placeholder="请选择"/>
|
||||
<field name="cutting_tool_total_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','夹头','刀柄'))]}"/>
|
||||
<field name="tool_hardness" string="硬度(hrc)"/>
|
||||
<label for="cutting_tool_run_out_accuracy_min" string="端跳精度"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<div class="o_address_format"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<label for="cutting_tool_run_out_accuracy_min" string="最小"/>
|
||||
<field name="cutting_tool_run_out_accuracy_min" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
<label for="cutting_tool_run_out_accuracy_max" string="最大"/>
|
||||
<field name="cutting_tool_run_out_accuracy_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
</div>
|
||||
|
||||
<field name="tool_width"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="tool_height"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_flange_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_shank_outer_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_shank_inner_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
|
||||
<!-- <field name="materials_type_id" options="{'no_create': True}" string="刀具材质"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"-->
|
||||
<!-- placeholder="请选择"/>-->
|
||||
<!-- <field name="tool_hardness" string="刀具硬度(hrc)"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>-->
|
||||
<!-- <field name="materials_type_id" options="{'no_create': True}" string="夹头材质"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"-->
|
||||
<!-- placeholder="请选择"/>-->
|
||||
<!-- <field name="tool_hardness" string="夹头硬度(hrc)"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>-->
|
||||
<!-- <field name="materials_type_id" options="{'no_create': True}" string="刀柄材质"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"-->
|
||||
<!-- placeholder="请选择"/>-->
|
||||
<!-- <field name="tool_hardness" string="刀柄硬度(hrc)"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>-->
|
||||
|
||||
<field name="cutting_tool_blade_diameter" string="刃部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_width"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_depth"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_helix_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_number" placeholder="请选择"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_tip_working_size"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_tip_diameter" string="刀尖直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_tip_taper" string="刀尖锥度(°)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<!--刀片-->
|
||||
<label for="tool_length" string="尺寸(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<div class="test_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}">
|
||||
<label for="tool_length" string="长"/>
|
||||
<field name="tool_length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="tool_thickness" string="厚"/>
|
||||
<field name="tool_thickness" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="tool_width" string="宽"/>
|
||||
<field name="tool_width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="cutting_tool_cut_blade_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_blade_tip_circular_arc_radius"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_blade_tip_height_tolerance"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_inscribed_circle_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_inscribed_circle_tolerance"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_install_aperture_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_chip_breaker_groove"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_cut_depth_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_blade_blade_number" string="刃数"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_blade_width" string="刃宽"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<!--刀杆-->
|
||||
|
||||
<label for="cutting_tool_knife_head_length" string="刀头尺寸(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<div class="test_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}">
|
||||
<label for="cutting_tool_knife_head_length" string="长"/>
|
||||
<field name="cutting_tool_knife_head_length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="cutting_tool_knife_head_width" string="宽"/>
|
||||
<field name="cutting_tool_knife_head_width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="cutting_tool_knife_head_height" string="高"/>
|
||||
<field name="cutting_tool_knife_head_height" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="cutting_tool_blade_diameter" string="刃部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
|
||||
<field name="cutting_tool_blade_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
|
||||
<field name="cutting_tool_cutter_arbor_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_cut_blade_length" string="切削刃长度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_cut_depth_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_min_machining_aperture"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_install_blade_tip_num"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<!--刀盘-->
|
||||
<field name="cutting_tool_cutter_head_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
<field name="cutting_tool_interface_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
|
||||
<!--夹头-->
|
||||
<field name="cutting_tool_clamping_length"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="cutting_tool_clamping_tolerance"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<label for="cutting_tool_clamping_diameter_min" string="夹持直径"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'/>
|
||||
<div class="o_address_format"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'>
|
||||
<label for="cutting_tool_clamping_diameter_min" string="最小"/>
|
||||
<field name="cutting_tool_clamping_diameter_min" class="o_address_zip diameter"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
<label for="cutting_tool_clamping_diameter_max" string="最大"/>
|
||||
<field name="cutting_tool_clamping_diameter_max" class="o_address_zip diameter"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
</div>
|
||||
<field name="cutting_tool_clamping_way"
|
||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))]}"/>
|
||||
<field name="cutting_tool_top_diameter" class="diameter"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="cutting_tool_outer_diameter" class="diameter"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="cutting_tool_inner_diameter" class="diameter"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<!--夹头-->
|
||||
|
||||
<field name="cutting_tool_standard_speed"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_speed_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_change_time"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_cooling_type"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
|
||||
<field name="materials_type_id" options="{'no_create': True}" placeholder="请选择"
|
||||
string="材质"/>
|
||||
<field name="coating_material"/>
|
||||
<field name="cutting_tool_blade_type"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_coarse_medium_fine" string="粗/中/精" placeholder="请选择"
|
||||
attrs="{'required': [('cutting_tool_type','=','整体式刀具')],'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||
<!--整体式刀具-->
|
||||
<field name="cutting_tool_shank_diameter" string="柄部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_shank_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_neck_diameter" string="颈部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_neck_length" string="颈部长度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_cut_depth"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_pitch"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="tool_weight"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'/>
|
||||
<field name="cutting_tool_taper"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))]}"/>
|
||||
<field name="cutting_tool_jump_accuracy"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_rear_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
||||
<field name="cutting_tool_main_included_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片','刀杆'))]}"/>
|
||||
<!-- <field name="cutting_tool_front_angle"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>-->
|
||||
<field name="cutting_tool_top_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
||||
<field name="cutting_tool_blade_tip_dip_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_side_cutting_edge_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_pitch"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_bladed_teeth_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_thickness_tolerance"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_thread_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_thread_num"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_cutter_bar_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_cutter_pad_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<!--刀柄-->
|
||||
<field name="cutting_tool_is_rough_finish"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_is_finish"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_is_drill_hole"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_is_high_speed_cutting"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_is_safety_lock" string="有无安全锁"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
|
||||
|
||||
<field name="cutting_tool_jump_accuracy" string="跳动精度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cutting_tool_max_load_capacity"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cutting_tool_er_size_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cutting_tool_handle_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cooling_suit_type_ids"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<!-- 刀杆 -->
|
||||
<field name="cutting_tool_rear_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_installing_structure"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_is_cooling_hole"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_locating_slot_code"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_tool_shim"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_cotter_pin"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_pressing_plate"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_screw"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀柄'))]}"/>
|
||||
<field name="cutting_tool_wrench"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀柄'))]}"/>
|
||||
<!-- 刀盘 -->
|
||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<group string="适配刀片形状"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'in', ('刀柄','夹头','整体式刀具',False))]}">
|
||||
<field name="fit_blade_shape_id" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="适合加工方式"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<field name="suitable_machining_method_ids" string=""
|
||||
widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="刀尖特征"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<field name="blade_tip_characteristics_id" string=""
|
||||
widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<group string="柄部类型" attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<field name="handle_type_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="压紧方式"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}">
|
||||
<field name="compaction_way_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<group string="走刀方向">
|
||||
<field name="cutting_direction_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="适合冷却液">
|
||||
<field name="suitable_coolant_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="切削速度Vc"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||
<field name="cutting_speed_ids" string="" widget="one2many">
|
||||
<tree editable="bottom">
|
||||
<!-- <field name="order"/>-->
|
||||
<field name="execution_standard_id"/>
|
||||
<field name="material_code"/>
|
||||
<field name="material_id"/>
|
||||
<field name="material_grade"/>
|
||||
<field name="tensile_strength"/>
|
||||
<field name="hardness"/>
|
||||
<field name="cutting_speed_n1"/>
|
||||
<field name="cutting_speed_n2"/>
|
||||
<field name="cutting_speed_n3"/>
|
||||
<field name="cutting_speed_n4"/>
|
||||
<field name="cutting_speed_n5"/>
|
||||
<field name="rough_machining"/>
|
||||
<field name="precision_machining"/>
|
||||
<field name="application"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="每齿走刀量fz"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||
<field name="feed_per_tooth_ids" string="" widget="one2many">
|
||||
<tree editable="bottom">
|
||||
<field name="cutting_speed"
|
||||
attrs="{'readonly': [('materials_type_id','!=',False)]}"/>
|
||||
<field name="machining_method" placeholder="请选择"
|
||||
attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
||||
<field name="materials_type_id" placeholder="请选择"
|
||||
attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
||||
<field name="blade_diameter"/>
|
||||
<field name="feed_per_tooth"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</page>
|
||||
<page string="夹具物料参数" attrs="{'invisible': [('categ_type', '!=', '夹具')]}">
|
||||
<group attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","转接板(锁板)夹具","磁吸夹具","虎钳夹具","零点卡盘","零点托盘"))]}'>
|
||||
<group>
|
||||
<field name="brand_id"/>
|
||||
<field name="fixture_multi_mounting_type_id" options="{'no_create': True}"/>
|
||||
<label for="tool_length" string="尺寸(mm)"/>
|
||||
<div class="o_address_format">
|
||||
<label for="tool_length" string="长"/>
|
||||
<field name="tool_length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<label for="tool_width" string="宽"/>
|
||||
<field name="tool_width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<label for="tool_height" string="高"/>
|
||||
<field name="tool_height" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="tool_weight"></field>
|
||||
<label for="fixture_clamp_workpiece_length_max" string="夹持工件最大尺寸(mm)"
|
||||
attrs='{"invisible": [("fixture_material_type","in",("零点卡盘","零点托盘"))]}'/>
|
||||
<div class="o_address_format"
|
||||
attrs='{"invisible": [("fixture_material_type","in",("零点卡盘","零点托盘"))]}'>
|
||||
<label for="fixture_clamp_workpiece_length_max" string="长"/>
|
||||
<field name="fixture_clamp_workpiece_length_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<label for="fixture_clamp_workpiece_width_max" string="宽"/>
|
||||
<field name="fixture_clamp_workpiece_width_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<label for="fixture_clamp_workpiece_height_max" string="高"/>
|
||||
<field name="fixture_clamp_workpiece_height_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动托盘','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
</div>
|
||||
<field name="fixture_clamp_workpiece_diameter_max"
|
||||
attrs="{'invisible': [('fixture_material_type','in',('零点卡盘','零点托盘'))],'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<field name="fixture_maximum_carrying_weight"></field>
|
||||
<field name="fixture_maximum_clamping_force"></field>
|
||||
</group>
|
||||
<group>
|
||||
<field name="materials_type_id" options="{'no_create': True}"/>
|
||||
<field name="fixture_clamping_way"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/>
|
||||
<field name="fixture_port_type"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/>
|
||||
<field name="fixture_through_hole_size"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/>
|
||||
<field name="fixture_screw_size"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/>
|
||||
<field name="fixture_driving_way"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("虎钳夹具","零点卡盘","零点托盘"))]}'/>
|
||||
<field name="fixture_apply_machine_tool_type_ids" options="{'no_create': True}"
|
||||
widget="many2many_tags"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("零点卡盘","零点托盘"))]}'/>
|
||||
</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>
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_mrp_production_workorder_tray_form_inherit_sf1" model="ir.ui.view">
|
||||
<field name="name">production.workorder.dlm</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="inherit_id" ref="sf_manufacturing.view_mrp_production_workorder_tray_form_inherit_sf"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[1]" position="before">
|
||||
<page string="开料要求" attrs='{"invisible": [("routing_type","!=","切割")]}'>
|
||||
<group>
|
||||
<group>
|
||||
<field name="product_tmpl_id_materials_id" widget="many2one"/>
|
||||
<field name="product_tmpl_id_materials_type_id" widget="many2one"/>
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field name="product_tmpl_id_length"/>
|
||||
<field name="product_tmpl_id_width"/>
|
||||
<field name="product_tmpl_id_height"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
0
sf_dlm_management/__init__.py
Normal file
0
sf_dlm_management/__init__.py
Normal file
24
sf_dlm_management/__manifest__.py
Normal file
24
sf_dlm_management/__manifest__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
{
|
||||
'name': '机企猫智能工厂 产品管理',
|
||||
'version': '1.0',
|
||||
'summary': '智能工厂产品模块',
|
||||
'sequence': 1,
|
||||
'description': """
|
||||
""",
|
||||
'category': 'sf',
|
||||
'website': 'https://www.sf.jikimo.com',
|
||||
'depends': ['sf_sale', 'sf_dlm','sf_manufacturing'],
|
||||
'data': [
|
||||
'views/product_template_management_view.xml',
|
||||
],
|
||||
'demo': [
|
||||
],
|
||||
'qweb': [
|
||||
],
|
||||
'license': 'LGPL-3',
|
||||
'installable': True,
|
||||
'application': False,
|
||||
'auto_install': False,
|
||||
}
|
||||
116
sf_dlm_management/data/product_data.xml
Normal file
116
sf_dlm_management/data/product_data.xml
Normal file
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record id="product_category_embryo_sf" model="product.category">
|
||||
<field name="name">坯料</field>
|
||||
<field name="type">坯料</field>
|
||||
</record>
|
||||
<record id="product_category_finished_sf" model="product.category">
|
||||
<field name="name">成品</field>
|
||||
<field name="type">成品</field>
|
||||
</record>
|
||||
|
||||
<record id="product_category_raw_sf" model="product.category">
|
||||
<field name="name">原材料</field>
|
||||
<field name="type">原材料</field>
|
||||
</record>
|
||||
|
||||
<record id="product_category_surface_technics_sf" model="product.category">
|
||||
<field name="name">表面工艺</field>
|
||||
<field name="type">表面工艺</field>
|
||||
</record>
|
||||
|
||||
<record id="product_category_cutting_tool_sf" model="product.category">
|
||||
<field name="name">刀具</field>
|
||||
<field name="type">刀具</field>
|
||||
</record>
|
||||
|
||||
<record id="product_category_clamp_sf" model="product.category">
|
||||
<field name="name">夹具</field>
|
||||
<field name="type">夹具</field>
|
||||
</record>
|
||||
|
||||
<record id="product_category_functional_tool_sf" model="product.category">
|
||||
<field name="name">功能刀具</field>
|
||||
<field name="type">功能刀具</field>
|
||||
</record>
|
||||
|
||||
<record id="product_functional_tool_sf" model="product.product">
|
||||
<field name="name">功能刀具</field>
|
||||
<field name="categ_id" ref="product_category_functional_tool_sf"/>
|
||||
<field name="route_ids"
|
||||
eval="[ref('stock.route_warehouse0_mto')]"/>
|
||||
<field name="invoice_policy">delivery</field>
|
||||
<field name="detailed_type">product</field>
|
||||
<field name="sale_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="tracking">serial</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_sf" model="product.product">
|
||||
<field name="name">CNC加工产品模板</field>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="categ_id" ref="product_category_finished_sf"/>
|
||||
<field name="route_ids"
|
||||
eval="[ref('stock.route_warehouse0_mto'), ref('mrp.route_warehouse0_manufacture')]"/>
|
||||
<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="single_manufacturing">true</field>-->
|
||||
<field name="tracking">serial</field>
|
||||
<!-- <field name="is_bfm">false</field>-->
|
||||
</record>
|
||||
<record id="product_embryo_sf_self_machining" model="product.product">
|
||||
<field name="name">坯料自加工模板</field>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="categ_id" ref="product_category_embryo_sf"/>
|
||||
<field name="route_ids"
|
||||
eval="[ref('stock.route_warehouse0_mto'), ref('mrp.route_warehouse0_manufacture')]"/>
|
||||
<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="single_manufacturing">true</field>-->
|
||||
<field name="tracking">serial</field>
|
||||
<!-- <field name="is_bfm">false</field>-->
|
||||
</record>
|
||||
|
||||
<record id="product_embryo_sf_outsource" model="product.product">
|
||||
<field name="name">坯料外协加工模板</field>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="categ_id" ref="product_category_embryo_sf"/>
|
||||
<field name="route_ids"
|
||||
eval="[ref('stock.route_warehouse0_mto'), ref('purchase_stock.route_warehouse0_buy'),ref('mrp_subcontracting.route_resupply_subcontractor_mto')]"/>
|
||||
<field name="invoice_policy">delivery</field>
|
||||
<field name="detailed_type">product</field>
|
||||
<field name="purchase_ok">true</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="tracking">serial</field>
|
||||
<field name="is_bfm">false</field>
|
||||
</record>
|
||||
<record id="product_embryo_sf_purchase" model="product.product">
|
||||
<field name="name">坯料采购模板</field>
|
||||
<field name="active" eval="False"/>
|
||||
<field name="categ_id" ref="product_category_embryo_sf"/>
|
||||
<field name="route_ids"
|
||||
eval="[ref('stock.route_warehouse0_mto'), ref('purchase_stock.route_warehouse0_buy')]"/>
|
||||
<field name="invoice_policy">delivery</field>
|
||||
<field name="detailed_type">product</field>
|
||||
<field name="purchase_ok">true</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="tracking">serial</field>
|
||||
<field name="is_bfm">false</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
7
sf_dlm_management/models/__init__.py
Normal file
7
sf_dlm_management/models/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
#from . import product_template
|
||||
#from . import product_supplierinfo
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
528
sf_dlm_management/views/product_template_management_view.xml
Normal file
528
sf_dlm_management/views/product_template_management_view.xml
Normal file
@@ -0,0 +1,528 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_sale_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="sf_sale.view_product_template_form_inherit_sf"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="invoice_policy" position="after">
|
||||
<field name='categ_id'/>
|
||||
<field name='categ_type' invisible="1"/>
|
||||
<field name="upload_model_file"
|
||||
widget="many2many_binary"
|
||||
attrs="{'invisible': ['|', ('categ_type', '!=', '成品'),('categ_type', '=', False)]}"/>
|
||||
<field name="model_file" widget="Viewer3D" string="模型" readonly="1" force_save="1"
|
||||
attrs="{'invisible': ['|','|', ('categ_type', '!=', '成品'),('categ_type', '=', False),('model_file', '=', False)]}"/>
|
||||
<field name='cutting_tool_type' invisible="1"/>
|
||||
<field name="fixture_material_type" invisible="1"/>
|
||||
<field name="embryo_model_type_id" string="模型类型"
|
||||
attrs="{'invisible': ['|',('categ_type', '!=', '坯料'),('categ_type', '=', False)]}"/>
|
||||
<field name="materials_id" string="材料" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])]}"/>
|
||||
<field name="materials_type_id" string="型号" placeholder="请选择"
|
||||
domain="[('materials_id', '=', materials_id)]"
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])]}"/>
|
||||
<field name="server_product_process_parameters_id" string="表面工艺参数"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': ['|',('categ_type', '!=', '表面工艺'),('categ_type', '=', False)]}"/>
|
||||
<field name="cutting_tool_material_id" attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
||||
placeholder="请选择"/>
|
||||
<field name="cutting_tool_model_id" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
||||
domain="[('cutting_tool_material_id','=',cutting_tool_material_id)]"/>
|
||||
<field name="specification_id" placeholder="请选择" options='{"limit": 1}'
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
||||
domain="[('standard_library_id','=',cutting_tool_model_id)]"/>
|
||||
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||
placeholder="请选择"/>
|
||||
<field name="fixture_model_id" string="型号" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||
domain="[('fixture_material_id','=',fixture_material_id)]"/>
|
||||
</field>
|
||||
|
||||
<xpath expr="//label[@for='volume']" position="before">
|
||||
<label for="length" string="尺寸"
|
||||
attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>
|
||||
<div class="o_address_format"
|
||||
attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}">
|
||||
<label for="length" string="长"/>
|
||||
<field name="length" class="o_address_zip"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="width" string="宽"/>
|
||||
<field name="width" class="o_address_zip"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="height" string="高"/>
|
||||
<field name="height" class="o_address_zip"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//page[last()]" position="after">
|
||||
<page string="加工参数">
|
||||
<group>
|
||||
<group string="模型">
|
||||
<label for="model_long" string="尺寸[mm]"/>
|
||||
<div class="o_address_format">
|
||||
<label for="model_long" string="长"/>
|
||||
<field name="model_long" class="o_address_zip"/>
|
||||
<label for="model_width" string="宽"/>
|
||||
<field name="model_width" class="o_address_zip"/>
|
||||
<label for="model_height" string="高"/>
|
||||
<field name="model_height" class="o_address_zip"/>
|
||||
</div>
|
||||
<field name="model_volume" string="体积[mm³]"/>
|
||||
<field name="product_model_type_id" string="模型类型"/>
|
||||
<field name="model_processing_panel" placeholder="例如R,U" string="加工面板"/>
|
||||
<field name="model_machining_precision"/>
|
||||
<field name="model_process_parameters_ids" string="表面工艺参数"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True}"/>
|
||||
<field name="model_remark" string="备注说明"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_product_template_only_form_inherit_sf">
|
||||
<field name="name">product.template.only.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">
|
||||
<field name="barcode" position="replace">
|
||||
<field name='barcode' invisible="1"/>
|
||||
</field>
|
||||
<field name="default_code" position="replace">
|
||||
<field name='default_code' invisible="1"/>
|
||||
</field>
|
||||
<xpath expr="//page[@name='variants']" position="before">
|
||||
<page string="刀具物料参数" attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
|
||||
<group>
|
||||
<group attrs="{'invisible': [('categ_type', '!=', '刀具')]}" col="1">
|
||||
<field name="cutting_tool_type_id" options="{'no_create': True}"
|
||||
placeholder="请选择"/>
|
||||
<field name="brand_id" options="{'no_create': True}" placeholder="请选择"/>
|
||||
<field name="cutting_tool_total_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','夹头','刀柄'))]}"/>
|
||||
<field name="tool_hardness" string="硬度(hrc)"/>
|
||||
<label for="cutting_tool_run_out_accuracy_min" string="端跳精度"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<div class="o_address_format"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<label for="cutting_tool_run_out_accuracy_min" string="最小"/>
|
||||
<field name="cutting_tool_run_out_accuracy_min" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
<label for="cutting_tool_run_out_accuracy_max" string="最大"/>
|
||||
<field name="cutting_tool_run_out_accuracy_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
</div>
|
||||
|
||||
<field name="tool_width"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="tool_height"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_flange_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_shank_outer_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_shank_inner_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
|
||||
<!-- <field name="materials_type_id" options="{'no_create': True}" string="刀具材质"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"-->
|
||||
<!-- placeholder="请选择"/>-->
|
||||
<!-- <field name="tool_hardness" string="刀具硬度(hrc)"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>-->
|
||||
<!-- <field name="materials_type_id" options="{'no_create': True}" string="夹头材质"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"-->
|
||||
<!-- placeholder="请选择"/>-->
|
||||
<!-- <field name="tool_hardness" string="夹头硬度(hrc)"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>-->
|
||||
<!-- <field name="materials_type_id" options="{'no_create': True}" string="刀柄材质"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"-->
|
||||
<!-- placeholder="请选择"/>-->
|
||||
<!-- <field name="tool_hardness" string="刀柄硬度(hrc)"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>-->
|
||||
|
||||
<field name="cutting_tool_blade_diameter" string="刃部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_width"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_depth"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_helix_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_number" placeholder="请选择"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_tip_working_size"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_tip_diameter" string="刀尖直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_blade_tip_taper" string="刀尖锥度(°)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<!--刀片-->
|
||||
<label for="tool_length" string="尺寸(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<div class="test_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}">
|
||||
<label for="tool_length" string="长"/>
|
||||
<field name="tool_length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="tool_thickness" string="厚"/>
|
||||
<field name="tool_thickness" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="tool_width" string="宽"/>
|
||||
<field name="tool_width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="cutting_tool_cut_blade_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_blade_tip_circular_arc_radius"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_blade_tip_height_tolerance"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_inscribed_circle_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_inscribed_circle_tolerance"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_install_aperture_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_chip_breaker_groove"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_cut_depth_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_blade_blade_number" string="刃数"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_blade_width" string="刃宽"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<!--刀杆-->
|
||||
|
||||
<label for="cutting_tool_knife_head_length" string="刀头尺寸(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<div class="test_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}">
|
||||
<label for="cutting_tool_knife_head_length" string="长"/>
|
||||
<field name="cutting_tool_knife_head_length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="cutting_tool_knife_head_width" string="宽"/>
|
||||
<field name="cutting_tool_knife_head_width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="cutting_tool_knife_head_height" string="高"/>
|
||||
<field name="cutting_tool_knife_head_height" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="cutting_tool_blade_diameter" string="刃部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
|
||||
<field name="cutting_tool_blade_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
|
||||
<field name="cutting_tool_cutter_arbor_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_cut_blade_length" string="切削刃长度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_cut_depth_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_min_machining_aperture"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_install_blade_tip_num"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<!--刀盘-->
|
||||
<field name="cutting_tool_cutter_head_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
<field name="cutting_tool_interface_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
|
||||
<!--夹头-->
|
||||
<field name="cutting_tool_clamping_length"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="cutting_tool_clamping_tolerance"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<label for="cutting_tool_clamping_diameter_min" string="夹持直径"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'/>
|
||||
<div class="o_address_format"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'>
|
||||
<label for="cutting_tool_clamping_diameter_min" string="最小"/>
|
||||
<field name="cutting_tool_clamping_diameter_min" class="o_address_zip diameter"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
<label for="cutting_tool_clamping_diameter_max" string="最大"/>
|
||||
<field name="cutting_tool_clamping_diameter_max" class="o_address_zip diameter"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
</div>
|
||||
<field name="cutting_tool_clamping_way"
|
||||
attrs="{'required': [('cutting_tool_type','in',('整体式刀具','刀片','刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_top_diameter" class="diameter"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="cutting_tool_outer_diameter" class="diameter"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="cutting_tool_inner_diameter" class="diameter"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<!--夹头-->
|
||||
|
||||
<field name="cutting_tool_standard_speed"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_speed_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_change_time"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_cooling_type"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
|
||||
<field name="materials_type_id" options="{'no_create': True}" placeholder="请选择"
|
||||
string="材质"/>
|
||||
<field name="coating_material"/>
|
||||
<field name="cutting_tool_blade_type"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_coarse_medium_fine" string="粗/中/精" placeholder="请选择"
|
||||
attrs="{'required': [('cutting_tool_type','=','整体式刀具')],'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||
<!--整体式刀具-->
|
||||
<field name="cutting_tool_shank_diameter" string="柄部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_shank_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_neck_diameter" string="颈部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_neck_length" string="颈部长度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_cut_depth"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_pitch"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="tool_weight"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'/>
|
||||
<field name="cutting_tool_taper"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))]}"/>
|
||||
<field name="cutting_tool_jump_accuracy"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_rear_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
||||
<field name="cutting_tool_main_included_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片','刀杆'))]}"/>
|
||||
<!-- <field name="cutting_tool_front_angle"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>-->
|
||||
<field name="cutting_tool_top_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
||||
<field name="cutting_tool_blade_tip_dip_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_side_cutting_edge_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_pitch"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_bladed_teeth_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_thickness_tolerance"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_thread_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_thread_num"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_cutter_bar_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_cutter_pad_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<!--刀柄-->
|
||||
<field name="cutting_tool_is_rough_finish"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_is_finish"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_is_drill_hole"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_is_high_speed_cutting"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_is_safety_lock" string="有无安全锁"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
|
||||
|
||||
<field name="cutting_tool_jump_accuracy" string="跳动精度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cutting_tool_max_load_capacity"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cutting_tool_er_size_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cutting_tool_handle_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cooling_suit_type_ids"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<!-- 刀杆 -->
|
||||
<field name="cutting_tool_rear_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_installing_structure"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_is_cooling_hole"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_locating_slot_code"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="cutting_tool_tool_shim"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_cotter_pin"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_pressing_plate"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||
<field name="cutting_tool_screw"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀柄'))]}"/>
|
||||
<field name="cutting_tool_wrench"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀柄'))]}"/>
|
||||
<!-- 刀盘 -->
|
||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<group string="适配刀片形状"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'in', ('刀柄','夹头','整体式刀具',False))]}">
|
||||
<field name="fit_blade_shape_id" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="适合加工方式"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<field name="suitable_machining_method_ids" string=""
|
||||
widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="刀尖特征"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<field name="blade_tip_characteristics_id" string=""
|
||||
widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<group string="柄部类型"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<field name="handle_type_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="压紧方式"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}">
|
||||
<field name="compaction_way_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<group string="走刀方向">
|
||||
<field name="cutting_direction_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="适合冷却液">
|
||||
<field name="suitable_coolant_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="切削速度Vc"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||
<field name="cutting_speed_ids" string="" widget="one2many">
|
||||
<tree editable="bottom">
|
||||
<!-- <field name="order"/>-->
|
||||
<field name="execution_standard_id"/>
|
||||
<field name="material_code"/>
|
||||
<field name="material_id"/>
|
||||
<field name="material_grade"/>
|
||||
<field name="tensile_strength"/>
|
||||
<field name="hardness"/>
|
||||
<field name="cutting_speed_n1"/>
|
||||
<field name="cutting_speed_n2"/>
|
||||
<field name="cutting_speed_n3"/>
|
||||
<field name="cutting_speed_n4"/>
|
||||
<field name="cutting_speed_n5"/>
|
||||
<field name="rough_machining"/>
|
||||
<field name="precision_machining"/>
|
||||
<field name="application"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="每齿走刀量fz"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||
<field name="feed_per_tooth_ids" string="" widget="one2many">
|
||||
<tree editable="bottom">
|
||||
<field name="cutting_speed"
|
||||
attrs="{'readonly': [('materials_type_id','!=',False)]}"/>
|
||||
<field name="machining_method" placeholder="请选择"
|
||||
attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
||||
<field name="materials_type_id" placeholder="请选择"
|
||||
attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
||||
<field name="blade_diameter"/>
|
||||
<field name="feed_per_tooth"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</page>
|
||||
<page string="夹具物料参数" attrs="{'invisible': [('categ_type', '!=', '夹具')]}">
|
||||
<group attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","转接板(锁板)夹具","磁吸夹具","虎钳夹具","零点卡盘","零点托盘"))]}'>
|
||||
<group>
|
||||
<field name="brand_id"/>
|
||||
<field name="fixture_multi_mounting_type_id" options="{'no_create': True}"/>
|
||||
<label for="tool_length" string="尺寸(mm)"/>
|
||||
<div class="o_address_format">
|
||||
<label for="tool_length" string="长"/>
|
||||
<field name="tool_length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<label for="tool_width" string="宽"/>
|
||||
<field name="tool_width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<label for="tool_height" string="高"/>
|
||||
<field name="tool_height" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="tool_weight"></field>
|
||||
<label for="fixture_clamp_workpiece_length_max" string="夹持工件最大尺寸(mm)"
|
||||
attrs='{"invisible": [("fixture_material_type","in",("零点卡盘","零点托盘"))]}'/>
|
||||
<div class="o_address_format"
|
||||
attrs='{"invisible": [("fixture_material_type","in",("零点卡盘","零点托盘"))]}'>
|
||||
<label for="fixture_clamp_workpiece_length_max" string="长"/>
|
||||
<field name="fixture_clamp_workpiece_length_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<label for="fixture_clamp_workpiece_width_max" string="宽"/>
|
||||
<field name="fixture_clamp_workpiece_width_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<!-- <span>&nbsp;</span>-->
|
||||
<label for="fixture_clamp_workpiece_height_max" string="高"/>
|
||||
<field name="fixture_clamp_workpiece_height_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动托盘','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
</div>
|
||||
<field name="fixture_clamp_workpiece_diameter_max"
|
||||
attrs="{'invisible': [('fixture_material_type','in',('零点卡盘','零点托盘'))],'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<field name="fixture_maximum_carrying_weight"></field>
|
||||
<field name="fixture_maximum_clamping_force"></field>
|
||||
</group>
|
||||
<group>
|
||||
<field name="materials_type_id" options="{'no_create': True}"/>
|
||||
<field name="fixture_clamping_way"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/>
|
||||
<field name="fixture_port_type"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/>
|
||||
<field name="fixture_through_hole_size"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/>
|
||||
<field name="fixture_screw_size"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/>
|
||||
<field name="fixture_driving_way"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("虎钳夹具","零点卡盘","零点托盘"))]}'/>
|
||||
<field name="fixture_apply_machine_tool_type_ids" options="{'no_create': True}"
|
||||
widget="many2many_tags"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("零点卡盘","零点托盘"))]}'/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,13 +1,7 @@
|
||||
from odoo import fields, models,api
|
||||
|
||||
|
||||
class ResProductCategory(models.Model):
|
||||
_inherit = "product.category"
|
||||
|
||||
type = fields.Selection(
|
||||
[("成品", "成品"), ("坯料", "坯料"), ("原材料", "原材料"), ("表面工艺", "表面工艺"), ("刀具", "刀具"),
|
||||
("夹具", "夹具"), ("功能刀具", "功能刀具")],
|
||||
default="", string="类型")
|
||||
|
||||
|
||||
class ModelType(models.Model):
|
||||
|
||||
@@ -187,6 +187,23 @@ class ResMrpWorkOrder(models.Model):
|
||||
|
||||
# 拼接工单对象属性值
|
||||
def json_workorder_str(self, k, production, route):
|
||||
# 计算预计时长duration_expected
|
||||
if route.routing_type == '切割':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '切割')]).time_cycle
|
||||
elif route.routing_type == '获取CNC加工程序':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '获取CNC加工程序')]).time_cycle
|
||||
elif route.routing_type == '工件装夹':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '工件装夹')]).time_cycle
|
||||
elif route.routing_type == '前置三元定位检测':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '前置三元定位检测')]).time_cycle
|
||||
elif route.routing_type == 'CNC加工':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', 'CNC加工')]).time_cycle
|
||||
elif route.routing_type == '后置三元质量检测':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '后置三元质量检测')]).time_cycle
|
||||
elif route.routing_type == '解除装夹':
|
||||
duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', '解除装夹')]).time_cycle
|
||||
else:
|
||||
duration_expected = 60
|
||||
workorders_values_str = [0, '', {
|
||||
'product_uom_id': production.product_uom_id.id,
|
||||
'qty_producing': 0,
|
||||
@@ -201,7 +218,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
production.product_id),
|
||||
'date_planned_start': False,
|
||||
'date_planned_finished': False,
|
||||
'duration_expected': 60,
|
||||
'duration_expected': duration_expected,
|
||||
'duration': 0,
|
||||
|
||||
}]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.modules import get_resource_path
|
||||
@@ -14,22 +15,9 @@ import json
|
||||
|
||||
class ResProductMo(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
model_file = fields.Binary('模型文件')
|
||||
|
||||
# categ_type = fields.Selection(
|
||||
# [("成品", "成品"), ("坯料", "坯料"), ("原材料", "原材料"), ("表面工艺", "表面工艺"), ("刀具", "刀具"),
|
||||
# ("夹具", "夹具")],
|
||||
# string='产品的类别', compute='_compute_categ_id',
|
||||
# store=True)
|
||||
#
|
||||
# @api.depends('categ_id')
|
||||
# def _compute_categ_id(self):
|
||||
# for record in self:
|
||||
# if record:
|
||||
# record.categ_type = record.categ_id.type
|
||||
|
||||
categ_type = fields.Selection(string='产品的类别', related='categ_id.type', store=True)
|
||||
|
||||
model_name = fields.Char('模型名称')
|
||||
model_long = fields.Float('模型长(mm)', digits=(16, 3))
|
||||
model_width = fields.Float('模型宽(mm)', digits=(16, 3))
|
||||
@@ -46,10 +34,11 @@ class ResProductMo(models.Model):
|
||||
length = fields.Float('长(mm)', digits=(16, 3))
|
||||
width = fields.Float('宽(mm)', digits=(16, 3))
|
||||
height = fields.Float('高(mm)', digits=(16, 3))
|
||||
single_manufacturing = fields.Boolean(string="单个制造")
|
||||
# single_manufacturing = fields.Boolean(string="单个制造")
|
||||
model_code = fields.Char('模型编码')
|
||||
is_bfm = fields.Boolean('业务平台是否自动创建', default=False)
|
||||
upload_model_file = fields.Many2many('ir.attachment', 'upload_model_file_attachment_ref', string='上传模型文件')
|
||||
model_file = fields.Binary('模型文件')
|
||||
product_model_type_id = fields.Many2one('sf.model.type', string='产品模型类型')
|
||||
embryo_model_type_id = fields.Many2one('sf.model.type', string='坯料模型类型')
|
||||
materials_id = fields.Many2one('sf.production.materials', string='材料')
|
||||
@@ -81,7 +70,7 @@ class ResProductMo(models.Model):
|
||||
# 整体式刀具特有字段
|
||||
cutting_tool_total_length = fields.Float('总长度(mm)', digits=(6, 1))
|
||||
cutting_tool_shank_length = fields.Float('柄部长度(mm)', digits=(6, 1))
|
||||
cutting_tool_blade_length = fields.Char('刃部长度(mm)')
|
||||
cutting_tool_blade_length = fields.Float('刃部长度(mm)')
|
||||
cutting_tool_blade_number = fields.Selection(
|
||||
[('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8')], '刃数(个)')
|
||||
# 整体式刀具新增字段
|
||||
@@ -92,11 +81,11 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_blade_tip_taper = fields.Integer('刀尖锥度(°)')
|
||||
cutting_tool_blade_helix_angle = fields.Integer('刃部螺旋角(°)')
|
||||
cutting_tool_blade_type = fields.Char('刃部类型')
|
||||
cutting_tool_pitch = fields.Char('牙距(mm)', size=20)
|
||||
cutting_tool_blade_width = fields.Char('刃部宽度(mm)', size=20)
|
||||
cutting_tool_blade_depth = fields.Char('刃部深度(mm)', size=20)
|
||||
cutting_tool_cut_depth = fields.Char('切削深度(mm)', size=20)
|
||||
cutting_tool_cut_depth_max = fields.Char('最大切削深度(mm)', size=20)
|
||||
cutting_tool_pitch = fields.Float('牙距(mm)')
|
||||
cutting_tool_blade_width = fields.Float('刃部宽度(mm)')
|
||||
cutting_tool_blade_depth = fields.Float('刃部深度(mm)')
|
||||
cutting_tool_cut_depth = fields.Float('切削深度(mm)')
|
||||
cutting_tool_cut_depth_max = fields.Float('最大切削深度(mm)')
|
||||
cutting_tool_coarse_medium_fine = fields.Selection([('粗', '粗'), ('中', '中'), ('精', '精')], '粗/中/精')
|
||||
cutting_tool_run_out_accuracy_max = fields.Float('端跳精度max', digits=(6, 1))
|
||||
cutting_tool_run_out_accuracy_min = fields.Float('端跳精度min', digits=(6, 1))
|
||||
@@ -116,7 +105,7 @@ class ResProductMo(models.Model):
|
||||
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'rel_coolant_product_template',
|
||||
'适合冷却液', domain=[('type', '=', '冷却液')])
|
||||
compaction_way_ids = fields.Many2many('maintenance.equipment.image', 'rel_compaction_product_template',
|
||||
'压紧方式', domain=[('type', '=', '压紧方式')]) \
|
||||
'压紧方式', domain=[('type', '=', '压紧方式')])
|
||||
|
||||
@api.onchange('cutting_tool_material_id')
|
||||
def _onchange_cutting_tool_material_id(self):
|
||||
@@ -162,29 +151,29 @@ class ResProductMo(models.Model):
|
||||
item.cutting_speed_ids = False
|
||||
item.feed_per_tooth_ids = False
|
||||
|
||||
# def choice(self):
|
||||
# if self.cutting_tool_type == '整体式刀具':
|
||||
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_integral_tree')
|
||||
# elif self.cutting_tool_type == '刀片':
|
||||
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_blade_tree')
|
||||
# elif self.cutting_tool_type == '刀杆':
|
||||
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_cutter_bar_tree')
|
||||
# elif self.cutting_tool_type == '刀盘':
|
||||
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_tree')
|
||||
# elif self.cutting_tool_type == '刀柄':
|
||||
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_tree')
|
||||
# else :
|
||||
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_tree')
|
||||
# return {
|
||||
# 'name': _('规格'),
|
||||
# 'view_mode': 'list',
|
||||
# 'view_id': tree_view.id,
|
||||
# 'type': 'ir.actions.act_window',
|
||||
# 'res_model': 'sf.tool.materials.basic.parameters',
|
||||
# 'target': 'new',
|
||||
# 'domain': [('cutting_tool_type', '=', self.cutting_tool_type),
|
||||
# ('standard_library_id', '=', self.cutting_tool_model_id.id)],
|
||||
# }
|
||||
def choice(self):
|
||||
if self.cutting_tool_type == '整体式刀具':
|
||||
tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_integral_tree')
|
||||
elif self.cutting_tool_type == '刀片':
|
||||
tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_blade_tree')
|
||||
elif self.cutting_tool_type == '刀杆':
|
||||
tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_cutter_bar_tree')
|
||||
elif self.cutting_tool_type == '刀盘':
|
||||
tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_tree')
|
||||
elif self.cutting_tool_type == '刀柄':
|
||||
tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_tree')
|
||||
else:
|
||||
tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_tree')
|
||||
return {
|
||||
'name': _('规格'),
|
||||
'view_mode': 'list',
|
||||
'view_id': tree_view.id,
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'sf.tool.materials.basic.parameters',
|
||||
'target': 'new',
|
||||
'domain': [('cutting_tool_type', '=', self.cutting_tool_type),
|
||||
('standard_library_id', '=', self.cutting_tool_model_id.id)],
|
||||
}
|
||||
|
||||
@api.onchange('specification_id')
|
||||
def _onchange_specification(self):
|
||||
@@ -288,6 +277,10 @@ class ResProductMo(models.Model):
|
||||
self.cutting_tool_blade_length = self.specification_id.blade_length
|
||||
self.cutting_tool_cutter_head_diameter = self.specification_id.cutter_head_diameter
|
||||
self.cutting_tool_interface_diameter = self.specification_id.interface_diameter
|
||||
else:
|
||||
self.cutting_tool_knife_head_height = self.specification_id.knife_head_height
|
||||
self.cutting_tool_knife_head_width = self.specification_id.knife_head_width
|
||||
self.cutting_tool_knife_head_length = self.specification_id.knife_head_length
|
||||
elif self.cutting_tool_type == '刀柄':
|
||||
self.cutting_tool_total_length = self.specification_id.total_length
|
||||
self.cutting_tool_standard_speed = self.specification_id.standard_rotate_speed
|
||||
@@ -321,7 +314,6 @@ class ResProductMo(models.Model):
|
||||
[])] if not self.cutting_tool_model_id.compaction_way_ids else [
|
||||
(6, 0, self.cutting_tool_model_id.compaction_way_ids.ids)]
|
||||
|
||||
|
||||
# @api.constrains('suitable_machining_method_ids')
|
||||
# def _check_suitable_machining_method_ids(self):
|
||||
# for record in self:
|
||||
@@ -406,10 +398,8 @@ class ResProductMo(models.Model):
|
||||
# raise ValidationError("端跳精度最大(max)不能为0")
|
||||
|
||||
cutting_tool_diameter = fields.Float('直径(mm)')
|
||||
cutting_tool_front_angle = fields.Integer('前角(°)')
|
||||
cutting_tool_rear_angle = fields.Integer('后角(°)')
|
||||
cutting_tool_main_included_angle = fields.Integer('主偏角(°)')
|
||||
# cutting_tool_material_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||
# 适用夹头型号可以多选
|
||||
cutting_tool_chuck_ids = fields.Many2many(
|
||||
'sf.cutting_tool.standard.library',
|
||||
@@ -419,11 +409,11 @@ class ResProductMo(models.Model):
|
||||
domain="[('cutting_tool_type', '=', '夹头')]",
|
||||
string='适用夹头型号')
|
||||
# 刀片参数
|
||||
cutting_tool_cut_blade_length = fields.Char('切削刃长(mm)', size=20)
|
||||
cutting_tool_cut_blade_length = fields.Float('切削刃长(mm)')
|
||||
cutting_tool_blade_tip_circular_arc_radius = fields.Char('刀尖圆弧半径(mm)', size=20)
|
||||
cutting_tool_top_angle = fields.Integer('顶角(°)')
|
||||
cutting_tool_inscribed_circle_diameter = fields.Char('内接圆直径(mm)', size=20)
|
||||
cutting_tool_install_aperture_diameter = fields.Char('安装孔直径(mm)', size=20)
|
||||
cutting_tool_inscribed_circle_diameter = fields.Float('内接圆直径(mm)')
|
||||
cutting_tool_install_aperture_diameter = fields.Float('安装孔直径(mm)')
|
||||
cutting_tool_chip_breaker_groove = fields.Selection([('无', '无'), ('单面', '单面'), ('双面', '双面')],
|
||||
string='有无断屑槽')
|
||||
cutting_tool_bladed_teeth_model = fields.Selection(
|
||||
@@ -441,13 +431,13 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_side_cutting_edge_angle = fields.Integer('侧切削角(°)')
|
||||
cutting_tool_thread_model = fields.Selection([('无', '无'), ('外螺纹', '外螺纹'), ('内螺纹', '内螺纹')],
|
||||
string='螺纹类型')
|
||||
cutting_tool_thread_num = fields.Char('每英寸螺纹数(tpi)', size=20)
|
||||
cutting_tool_thread_num = fields.Float('每英寸螺纹数(tpi)')
|
||||
cutting_tool_blade_tip_height_tolerance = fields.Char('刀尖高度公差(mm)', size=20)
|
||||
cutting_tool_inscribed_circle_tolerance = fields.Char('内接圆公差(mm)', size=20)
|
||||
cutting_tool_thickness_tolerance = fields.Char('厚度公差(mm)', size=20)
|
||||
|
||||
cutting_tool_jump_accuracy = fields.Char('径跳精度(mm)')
|
||||
cutting_tool_working_hardness = fields.Char('加工硬度(hrc)')
|
||||
cutting_tool_working_hardness = fields.Integer('加工硬度(hrc)')
|
||||
cutting_tool_cutter_bar_ids = fields.Many2many(
|
||||
'sf.cutting_tool.standard.library',
|
||||
relation='product_cutting_tool_library_cutter_bar_rel',
|
||||
@@ -469,9 +459,9 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_knife_head_width = fields.Float('刀头宽度(mm)')
|
||||
cutting_tool_knife_head_length = fields.Float('刀头长度(mm)')
|
||||
cutting_tool_blade_diameter = fields.Float('刃径/刃部直径(mm)')
|
||||
cutting_tool_cutter_arbor_diameter = fields.Char('刀杆直径(mm)', size=20)
|
||||
cutting_tool_min_machining_aperture = fields.Char('最小加工孔径(mm)', size=20)
|
||||
cutting_tool_install_blade_tip_num = fields.Char('可装刀片数/齿数(个)', size=20)
|
||||
cutting_tool_cutter_arbor_diameter = fields.Float('刀杆直径(mm)')
|
||||
cutting_tool_min_machining_aperture = fields.Integer('最小加工孔径(mm)')
|
||||
cutting_tool_install_blade_tip_num = fields.Integer('可装刀片数/齿数(个)', size=20)
|
||||
cutting_tool_installing_structure = fields.Char('安装结构', size=20)
|
||||
cutting_tool_blade_ids = fields.Many2many(
|
||||
'sf.cutting_tool.standard.library',
|
||||
@@ -489,8 +479,8 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_is_cooling_hole = fields.Boolean('有无冷却孔', default=False)
|
||||
cutting_tool_locating_slot_code = fields.Char('定位槽代号', size=20)
|
||||
# 刀盘参数
|
||||
cutting_tool_cutter_head_diameter = fields.Char('刀盘直径(mm)', size=20)
|
||||
cutting_tool_interface_diameter = fields.Char('接口直径(mm)', size=20)
|
||||
cutting_tool_cutter_head_diameter = fields.Float('刀盘直径(mm)')
|
||||
cutting_tool_interface_diameter = fields.Float('接口直径(mm)')
|
||||
|
||||
# 刀柄参数
|
||||
cutting_tool_shank_outer_diameter = fields.Float('柄部外径(mm)')
|
||||
@@ -508,7 +498,7 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_is_high_speed_cutting = fields.Boolean('可高速切削', default=False)
|
||||
cutting_tool_change_time = fields.Integer('换刀时间(s)')
|
||||
cutting_tool_clamping_way = fields.Char('夹持方式')
|
||||
cutting_tool_standard_speed = fields.Char('标准转速(n/min)')
|
||||
cutting_tool_standard_speed = fields.Integer('标准转速(n/min)')
|
||||
cutting_tool_speed_max = fields.Integer('最大转速(n/min)')
|
||||
cutting_tool_cooling_type = fields.Char('冷却类型')
|
||||
# 夹头参数
|
||||
@@ -517,7 +507,7 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_outer_diameter = fields.Float('外径(mm)')
|
||||
cutting_tool_inner_diameter = fields.Float('内径(mm)')
|
||||
cooling_suit_type_ids = fields.Char('适用冷却套型号')
|
||||
cutting_tool_max_load_capacity = fields.Char('最大负载能力(kg)')
|
||||
cutting_tool_max_load_capacity = fields.Float('最大负载能力(kg)')
|
||||
cutting_tool_er_size_model = fields.Char('ER尺寸型号')
|
||||
cutting_tool_handle_ids = fields.Many2many(
|
||||
'sf.cutting_tool.standard.library',
|
||||
@@ -692,7 +682,6 @@ class ResProductMo(models.Model):
|
||||
item.fixture_apply_machine_tool_type_ids = self._get_ids(
|
||||
item.fixture_model_id.apply_machine_tool_type_ids)
|
||||
|
||||
|
||||
def _get_volume_uom_id_from_ir_config_parameter(self):
|
||||
product_length_in_feet_param = self.env['ir.config_parameter'].sudo().get_param('product.volume_in_cubic_feet')
|
||||
if product_length_in_feet_param == '1':
|
||||
@@ -874,7 +863,7 @@ class ResProductMo(models.Model):
|
||||
# write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
||||
# 转化为glb
|
||||
output_glb_file = os.path.join('/tmp', str(code) + '.glb')
|
||||
util_path = get_resource_path('sf_dlm', 'static/util')
|
||||
util_path = get_resource_path('sf_base', 'static/util')
|
||||
cmd = 'python3 %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file)
|
||||
os.system(cmd)
|
||||
# 转base64
|
||||
@@ -884,95 +873,10 @@ class ResProductMo(models.Model):
|
||||
return base64_data
|
||||
|
||||
|
||||
class ResMrpBomMo(models.Model):
|
||||
_inherit = 'mrp.bom'
|
||||
|
||||
subcontractor_id = fields.Many2one('res.partner', string='外包商')
|
||||
|
||||
def bom_create_line_has(self, embryo):
|
||||
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)
|
||||
|
||||
# 业务平台分配工厂后在智能工厂先创建销售订单再创建该产品后再次进行创建bom
|
||||
def bom_create(self, product, bom_type, product_type):
|
||||
bom_id = self.env['mrp.bom'].create({
|
||||
'product_tmpl_id': product.product_tmpl_id.id,
|
||||
'type': bom_type,
|
||||
# 'subcontractor_id': '' or subcontract.partner_id.id,
|
||||
'product_qty': 1,
|
||||
'product_uom_id': 1
|
||||
})
|
||||
if bom_type == 'subcontract' and product_type is not False:
|
||||
subcontract = self.get_supplier(product.materials_type_id)
|
||||
bom_id.subcontractor_id = subcontract.partner_id.id
|
||||
return bom_id
|
||||
|
||||
# 坯料BOM组件:选取当前坯料原材料,
|
||||
# 然后根据当前的坯料的体积得出需要的原材料重量(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
||||
# 坯料所需原材料公式:当前的坯料的体积(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
||||
|
||||
def bom_create_line(self, embryo):
|
||||
# 选取当前坯料原材料
|
||||
raw_bom_line = self.get_raw_bom(embryo)
|
||||
if raw_bom_line:
|
||||
qty = 1
|
||||
if round(embryo.volume * raw_bom_line.materials_type_id.density / 1000000) > 1:
|
||||
qty = round(embryo.volume * raw_bom_line.materials_type_id.density / 1000000)
|
||||
bom_line = self.env['mrp.bom.line'].create({
|
||||
'bom_id': self.id,
|
||||
'product_id': raw_bom_line.id,
|
||||
'product_tmpl_id': raw_bom_line.product_tmpl_id.id,
|
||||
'product_qty': qty,
|
||||
'product_uom_id': raw_bom_line.uom_id.id,
|
||||
})
|
||||
return bom_line
|
||||
else:
|
||||
return False
|
||||
|
||||
# 查询材料型号默认排第一的供应商
|
||||
|
||||
def get_supplier(self, materials_type):
|
||||
seller_id = self.env['sf.supplier.sort'].search(
|
||||
[('materials_model_id', '=', materials_type.id)],
|
||||
limit=1,
|
||||
order='sequence asc')
|
||||
return seller_id
|
||||
|
||||
# 匹配bom
|
||||
|
||||
def get_bom(self, product):
|
||||
embryo_has = self.env['product.product'].search(
|
||||
[('categ_id.type', '=', '坯料'), ('materials_type_id', '=', product.materials_type_id.id),
|
||||
('length', '>', product.length), ('width', '>', product.width),
|
||||
('height', '>', product.height), ('is_bfm', '=', False)
|
||||
],
|
||||
limit=1,
|
||||
order='volume desc'
|
||||
)
|
||||
logging.info('get_bom-vals:%s' % embryo_has)
|
||||
if embryo_has:
|
||||
rate_of_waste = ((embryo_has.volume - product.model_volume) % embryo_has.volume) * 100
|
||||
if rate_of_waste <= 20:
|
||||
return embryo_has
|
||||
else:
|
||||
return
|
||||
|
||||
# 查bom的原材料
|
||||
def get_raw_bom(self, product):
|
||||
raw_bom = self.env['product.product'].search(
|
||||
[('categ_id.type', '=', '原材料'), ('materials_type_id', '=', product.materials_type_id.id)])
|
||||
return raw_bom
|
||||
|
||||
|
||||
class SfMaintenanceEquipmentAndProductTemplate(models.Model):
|
||||
_inherit = 'maintenance.equipment'
|
||||
_description = '设备'
|
||||
|
||||
product_template_ids = fields.One2many('maintenance.equipment.tool', 'equipment_id', string='机床刀位')
|
||||
|
||||
@api.model_create_multi
|
||||
@@ -995,8 +899,7 @@ class SfMaintenanceEquipmentTool(models.Model):
|
||||
_description = '机床刀位'
|
||||
|
||||
equipment_id = fields.Many2one('maintenance.equipment', string='设备')
|
||||
product_template_id = fields.Many2one('product.template', string='功能刀具名称',
|
||||
domain="[('categ_type', '=', '刀具')]")
|
||||
product_template_id = fields.Many2one('product.template', string='功能刀具名称', domain="[('categ_type', '=', '刀具')]")
|
||||
image_1920 = fields.Binary('图片', related='product_template_id.image_1920')
|
||||
categ_type = fields.Char(string='功能刀具类型')
|
||||
diameter = fields.Char('直径')
|
||||
@@ -1008,3 +911,5 @@ class SfMaintenanceEquipmentTool(models.Model):
|
||||
alarm_value = fields.Char('报警值')
|
||||
used_value = fields.Char('已使用值')
|
||||
code = fields.Char('机床刀位号')
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='state']" position="before">
|
||||
|
||||
<field name='user_permissions' invisible="1"/>
|
||||
<field name='name' invisible="1"/>
|
||||
<field name='routing_type' invisible="1"/>
|
||||
@@ -120,6 +119,22 @@
|
||||
context="{'default_workcenter_id': workcenter_id}" class="btn-danger"
|
||||
attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked'),('name','=','获取CNC加工程序')]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[1]" position="before">
|
||||
<page string="开料要求" attrs='{"invisible": [("routing_type","!=","切割")]}'>
|
||||
<group>
|
||||
<group>
|
||||
<field name="product_tmpl_id_materials_id" widget="many2one"/>
|
||||
<field name="product_tmpl_id_materials_type_id" widget="many2one"/>
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field name="product_tmpl_id_length"/>
|
||||
<field name="product_tmpl_id_width"/>
|
||||
<field name="product_tmpl_id_height"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
|
||||
<!-- 隐藏物料清单-->
|
||||
<!-- <xpath expr="//page[@name='components']" position="attributes">-->
|
||||
|
||||
@@ -11,6 +11,7 @@ class sf_production_plan(models.Model):
|
||||
_name = 'sf.production.plan'
|
||||
# _inherit = 'mrp.production'
|
||||
_description = 'sf_production_plan'
|
||||
_order = 'create_date desc'
|
||||
|
||||
state = fields.Selection([
|
||||
('draft', '待排程'),
|
||||
@@ -41,18 +42,12 @@ class sf_production_plan(models.Model):
|
||||
actual_end_time = fields.Datetime(string='实际结束时间')
|
||||
shift = fields.Char(string='班次')
|
||||
|
||||
|
||||
# 序号、坯料编号、坯料名称、材质、数量、长度、宽度、厚度、直径、计划开始时间、计划结束时间、状态(已产出与待产出)、操作、创建人、创建时间、客户名称、订单号、行号、长度、宽度、厚度、直径、交货数量、交货日期
|
||||
# sequence = fields.Integer(string='序号', required=True, copy=False, readonly=True, index=True,
|
||||
# default=lambda self: self.env['ir.sequence'].sudo().next_by_code('sf.pl.plan'))
|
||||
sequence = fields.Integer(string='序号', copy=False, readonly=True, index=True)
|
||||
current_operation_name = fields.Char(string='当前工序名称', size=64, default='生产计划')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# state = fields.Selection([
|
||||
# ('未排程', '未排程'), ('已排程', '已排程')], string='State', copy=False, index=True, readonly=True,
|
||||
# store=True, tracking=True)
|
||||
@@ -179,16 +174,62 @@ class sf_production_plan(models.Model):
|
||||
else:
|
||||
aa = self.env['mrp.production'].sudo().search([('name', '=', self.name)])
|
||||
workorder_time = 0
|
||||
print(aa.workorder_ids)
|
||||
print(type(aa.workorder_ids))
|
||||
if aa.workorder_ids:
|
||||
for item in aa.workorder_ids:
|
||||
workorder_id_list = self.production_id.workorder_ids.ids
|
||||
print(workorder_id_list)
|
||||
print(type(self.production_id.workorder_ids))
|
||||
if self.production_id.workorder_ids:
|
||||
for item in self.production_id.workorder_ids:
|
||||
if item.name == 'CNC加工':
|
||||
item.date_planned_start = self.date_planned_start
|
||||
item.date_planned_finished = item.date_planned_start + timedelta(
|
||||
minutes=self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', 'CNC加工')]).time_cycle)
|
||||
item.duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', 'CNC加工')]).time_cycle
|
||||
# print(item.id)
|
||||
sequence = workorder_id_list.index(item.id) - 1
|
||||
# print('sequence', sequence)
|
||||
# print('total', len(workorder_id_list))
|
||||
# 计算CNC加工之前工单的开始结束时间
|
||||
for i in range(sequence):
|
||||
current_workorder_id = (item.id - (i + 1))
|
||||
current_workorder_obj = self.env['mrp.workorder'].sudo().search(
|
||||
[('id', '=', current_workorder_id)])
|
||||
old_workorder_obj = self.env['mrp.workorder'].sudo().search(
|
||||
[('id', '=', (current_workorder_id + 1))])
|
||||
work_order = self.env['mrp.workorder'].sudo().search(
|
||||
[('production_id', '=', self.production_id.id), ('id', '=', current_workorder_id)])
|
||||
work_order.date_planned_finished = old_workorder_obj.date_planned_start
|
||||
work_order.date_planned_start = old_workorder_obj.date_planned_start - timedelta(
|
||||
minutes=self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', current_workorder_obj.name)]).time_cycle)
|
||||
# work_order.duration_expected = self.env['mrp.routing.workcenter'].sudo().search([('name', '=', current_workorder_obj.name)]).time_cycle
|
||||
# 计算CNC加工之后工单的开始结束时间
|
||||
for j in range(len(workorder_id_list) - sequence - 2):
|
||||
current_workorder_id = (item.id + (j + 1))
|
||||
current_workorder_obj = self.env['mrp.workorder'].sudo().search(
|
||||
[('id', '=', current_workorder_id)])
|
||||
old_workorder_obj = self.env['mrp.workorder'].sudo().search(
|
||||
[('id', '=', (current_workorder_id - 1))])
|
||||
work_order = self.env['mrp.workorder'].sudo().search(
|
||||
[('production_id', '=', self.production_id.id), ('id', '=', current_workorder_id)])
|
||||
try:
|
||||
work_order.date_planned_start = old_workorder_obj.date_planned_finished
|
||||
print('work_order.data_start', work_order.date_planned_start)
|
||||
work_order.date_planned_finished = old_workorder_obj.date_planned_finished + timedelta(
|
||||
minutes=self.env['mrp.routing.workcenter'].sudo().search(
|
||||
[('name', '=', current_workorder_obj.name)]).time_cycle)
|
||||
except ValueError as e:
|
||||
print('时间设置失败,请检查是否为工序分配工作中心,%s' % e)
|
||||
|
||||
current_workorder = self.env['mrp.workorder'].sudo().search([('id', '=', item.id)])
|
||||
workorder_time += current_workorder.duration_expected
|
||||
print(workorder_time)
|
||||
print('workorder_time', workorder_time)
|
||||
self.date_planned_finished = self.date_planned_start + timedelta(minutes=workorder_time)
|
||||
self.state = 'done'
|
||||
aa.schedule_state = '已排'
|
||||
self.production_id.schedule_state = '已排'
|
||||
# self.production_id.date_planned_start = self.date_planned_start
|
||||
# self.production_id.date_planned_finished = self.date_planned_finished
|
||||
else:
|
||||
raise ValidationError("未找到工单")
|
||||
# self.date_planned_finished = self.date_planned_start + timedelta(days=3)
|
||||
|
||||
Binary file not shown.
@@ -50,39 +50,39 @@
|
||||
</record>
|
||||
|
||||
<!-- 调整质量菜单顺序 -->
|
||||
<record id="quality_control.menu_quality_root" model="ir.ui.menu">
|
||||
<field name="sequence" eval="42"/>
|
||||
</record>
|
||||
<!-- <record id="quality_control.menu_quality_root" model="ir.ui.menu"> -->
|
||||
<!-- <field name="sequence" eval="42"/> -->
|
||||
<!-- </record> -->
|
||||
|
||||
<!-- 调整设备菜单顺序 -->
|
||||
<record id="maintenance.menu_maintenance_title" model="ir.ui.menu">
|
||||
<field name="sequence" eval="45"/>
|
||||
</record>
|
||||
<!-- <record id="maintenance.menu_maintenance_title" model="ir.ui.menu"> -->
|
||||
<!-- <field name="sequence" eval="45"/> -->
|
||||
<!-- </record> -->
|
||||
|
||||
<!-- 调整条码菜单顺序 -->
|
||||
<record id="stock_barcode.stock_barcode_menu" model="ir.ui.menu">
|
||||
<field name="sequence" eval="48"/>
|
||||
</record>
|
||||
<!-- <record id="stock_barcode.stock_barcode_menu" model="ir.ui.menu"> -->
|
||||
<!-- <field name="sequence" eval="48"/> -->
|
||||
<!-- </record> -->
|
||||
|
||||
<!-- 调整库存菜单顺序 -->
|
||||
<record id="stock.menu_stock_root" model="ir.ui.menu">
|
||||
<field name="sequence" eval="51"/>
|
||||
</record>
|
||||
<!-- <record id="stock.menu_stock_root" model="ir.ui.menu"> -->
|
||||
<!-- <field name="sequence" eval="51"/> -->
|
||||
<!-- </record> -->
|
||||
|
||||
<!-- 调整仪表板菜单顺序 -->
|
||||
<record id="spreadsheet_dashboard.spreadsheet_dashboard_menu_root" model="ir.ui.menu">
|
||||
<field name="sequence" eval="54"/>
|
||||
</record>
|
||||
<!-- <record id="spreadsheet_dashboard.spreadsheet_dashboard_menu_root" model="ir.ui.menu"> -->
|
||||
<!-- <field name="sequence" eval="54"/> -->
|
||||
<!-- </record> -->
|
||||
|
||||
<!-- 调整开票菜单名字及顺序 -->
|
||||
<record id="account.menu_finance" model="ir.ui.menu">
|
||||
<field name="name">应收应付</field>
|
||||
<field name="sequence" eval="57"/>
|
||||
</record>
|
||||
<!-- <record id="account.menu_finance" model="ir.ui.menu"> -->
|
||||
<!-- <field name="name">应收应付</field> -->
|
||||
<!-- <field name="sequence" eval="57"/> -->
|
||||
<!-- </record> -->
|
||||
<!-- 隐藏跟踪链 -->
|
||||
<record id="utm.menu_link_tracker_root" model="ir.ui.menu">
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
<!-- <record id="utm.menu_link_tracker_root" model="ir.ui.menu"> -->
|
||||
<!-- <field name="active" eval="False"/> -->
|
||||
<!-- </record> -->
|
||||
|
||||
<!-- 移除字段属性 -->
|
||||
<record id="view_order_form_inherited" model="ir.ui.view">
|
||||
|
||||
@@ -95,7 +95,7 @@ class QuickEasyOrder(models.Model):
|
||||
write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
||||
# 转化为glb
|
||||
output_glb_file = os.path.join('/tmp', str(model_code) + '.glb')
|
||||
util_path = get_resource_path('sf_dlm', 'static/util')
|
||||
util_path = get_resource_path('sf_base', 'static/util')
|
||||
cmd = 'python3 %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file)
|
||||
os.system(cmd)
|
||||
# 转base64
|
||||
|
||||
@@ -71,5 +71,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<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="sale.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="categ_id" position="replace">
|
||||
<field name='categ_id' invisible="1"/>
|
||||
</field>
|
||||
<field name="product_tag_ids" position="after">
|
||||
<field name="default_code" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
|
||||
<field name="barcode" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -10,7 +10,7 @@
|
||||
""",
|
||||
'category': 'sf',
|
||||
'website': 'https://www.sf.jikimo.com',
|
||||
'depends': ['account', 'sf_base', 'mrp', 'sf_manufacturing', 'sf_maintenance'],
|
||||
'depends': ['sf_base', 'sf_manufacturing'],
|
||||
'data': [
|
||||
# 'security/group_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
@@ -31,7 +31,6 @@
|
||||
'sf_tool_management/static/src/change.scss'
|
||||
]
|
||||
|
||||
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
'installable': True,
|
||||
|
||||
@@ -49,7 +49,7 @@ class SfToolMaterialSearch(models.Model):
|
||||
blade_rear_angle = fields.Float('刀片后角(°)')
|
||||
blade_main_included_angle = fields.Float('刀片主偏角(°)')
|
||||
blade_r_angle = fields.Float('刀片R角(°)')
|
||||
blade_hardness = fields.Char('刀片加工硬度')
|
||||
blade_hardness = fields.Integer('刀片加工硬度')
|
||||
blade_accuracy = fields.Char('刀片精度等级')
|
||||
blade_coating_material_id = fields.Char('刀片涂层材质')
|
||||
blade_radius = fields.Float('刀片刀尖半径(mm)')
|
||||
@@ -215,7 +215,7 @@ class SfToolMaterialSearch(models.Model):
|
||||
bar_screw = fields.Float('刀杆配备螺丝(mm)')
|
||||
bar_radius = fields.Float('刀杆刀尖圆角半径')
|
||||
bar_accuracy = fields.Char('刀杆精度等级')
|
||||
bar_hardness = fields.Char('刀杆硬度(°)')
|
||||
bar_hardness = fields.Integer('刀杆硬度(°)')
|
||||
bar_scope = fields.Char('刀杆适用范围')
|
||||
|
||||
# 刀盘特有字段
|
||||
@@ -237,7 +237,7 @@ class SfToolMaterialSearch(models.Model):
|
||||
pad_screw = fields.Float('刀盘配备螺丝(mm)')
|
||||
pad_radius = fields.Float('刀盘刀尖圆角半径')
|
||||
pad_accuracy = fields.Char('刀盘精度等级')
|
||||
pad_hardness = fields.Char('刀盘硬度(°)')
|
||||
pad_hardness = fields.Integer('刀盘硬度(°)')
|
||||
pad_scope = fields.Char('刀盘适用范围')
|
||||
|
||||
# 刀柄特有字段
|
||||
@@ -265,7 +265,7 @@ class SfToolMaterialSearch(models.Model):
|
||||
)
|
||||
handle_clamping_range = fields.Float('刀柄夹持范围(mm)')
|
||||
handle_detection_accuracy = fields.Float('刀柄检测精度')
|
||||
handle_detection_hardness = fields.Char('刀柄检测硬度')
|
||||
handle_detection_hardness = fields.Integer('刀柄检测硬度')
|
||||
handle_standard_speed = fields.Float('刀柄标准转速')
|
||||
|
||||
# 夹头特有字段
|
||||
|
||||
Reference in New Issue
Block a user