Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/刀具产品模板优化
# Conflicts: # sf_mrs_connect/models/res_config_setting.py
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
'data': [
|
||||
'data/product_data.xml',
|
||||
'data/uom_data.xml',
|
||||
'data/cutting_tool_data.xml',
|
||||
# 'data/cutting_tool_data.xml',
|
||||
'views/product_template_view.xml',
|
||||
'views/product_workorder.xml'
|
||||
],
|
||||
|
||||
@@ -20,16 +20,15 @@
|
||||
<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_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_clamp_sf" model="product.category">
|
||||
<field name="name">夹具</field>
|
||||
<field name="type">夹具</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_sf" model="product.product">
|
||||
<field name="name">CNC加工产品模板</field>
|
||||
@@ -37,15 +36,15 @@
|
||||
<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="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="single_manufacturing">true</field>
|
||||
<field name="tracking">serial</field>
|
||||
<!-- <field name="is_bfm">false</field>-->
|
||||
<field name="is_bfm">false</field>
|
||||
</record>
|
||||
<record id="product_embryo_sf_self_machining" model="product.product">
|
||||
<field name="name">坯料自加工模板</field>
|
||||
@@ -53,15 +52,15 @@
|
||||
<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="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="single_manufacturing">true</field>
|
||||
<field name="tracking">serial</field>
|
||||
<!-- <field name="is_bfm">false</field>-->
|
||||
<field name="is_bfm">false</field>
|
||||
</record>
|
||||
|
||||
<record id="product_embryo_sf_outsource" model="product.product">
|
||||
@@ -70,14 +69,14 @@
|
||||
<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="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>-->
|
||||
<field name="is_bfm">false</field>
|
||||
</record>
|
||||
<record id="product_embryo_sf_purchase" model="product.product">
|
||||
<field name="name">坯料采购模板</field>
|
||||
@@ -85,14 +84,14 @@
|
||||
<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="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>-->
|
||||
<field name="is_bfm">false</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,94 +1,17 @@
|
||||
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
|
||||
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 ResProductTemplate(models.Model):
|
||||
class ResProduct(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
# 模型的长,宽,高,体积,精度,材料
|
||||
|
||||
|
||||
# cutting_tool = fields.Selection([
|
||||
# ('整体式刀具', '整体式刀具'),
|
||||
# ('刀片', '刀片'),
|
||||
# ('刀杆', '刀杆'),
|
||||
# ('刀盘', '刀盘'),
|
||||
# ('刀柄', '刀柄'),
|
||||
# ('夹头', '夹头')], string='刀具物料')
|
||||
# # 关联整体式刀具型号
|
||||
# integral_cutting_tool_type_id = fields.Many2one('sf.integral.cutting.tool', '整体式刀具型号')
|
||||
# # 关联刀片型号
|
||||
# blade_type_id = fields.Many2one('sf.blade', '刀片型号')
|
||||
# # 关联刀杆型号
|
||||
# cutter_bar_type_id = fields.Many2one('sf.cutter.bar', '刀杆型号')
|
||||
# # 关联刀盘型号
|
||||
# cutter_pad_type_id = fields.Many2one('sf.cutter.pad', '刀盘型号')
|
||||
# # 关联刀柄型号
|
||||
# handle_type_id = fields.Many2one('sf.handle', '刀柄型号')
|
||||
# # 关联夹头型号
|
||||
# chuck_type_id = fields.Many2one('sf.chuck', '夹头型号')
|
||||
# cutting_tool_parameter_brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
||||
# # 整体式刀具参数
|
||||
# cutting_tool_parameter_total_length = fields.Float('总长度[mm]')
|
||||
# cutting_tool_parameter_shank_length = fields.Float('柄部长度[mm]')
|
||||
# cutting_tool_parameter_blade_length = fields.Float('刃部长度[mm]')
|
||||
# cutting_tool_parameter_diameter = fields.Float('直径[mm]')
|
||||
# cutting_tool_parameter_blade_number = fields.Integer('刃数')
|
||||
# cutting_tool_parameter_front_angle = fields.Float('前角(°)')
|
||||
# cutting_tool_parameter_rear_angle = fields.Float('后角(°)')
|
||||
# cutting_tool_parameter_main_included_angle = fields.Float('主偏角(°)')
|
||||
# cutting_tool_parameter_material_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||
# cutting_tool_parameter_nut = fields.Float('配对螺母[mm]')
|
||||
# # 适用夹头型号可以多选
|
||||
# cutting_tool_parameter_chuck_model_ids = fields.Many2many('sf.chuck', 'rel_product_chuck', string='适用夹头型号')
|
||||
# cutting_tool_parameter_scope = fields.Char('适用范围')
|
||||
# # 刀片参数
|
||||
# cutting_tool_parameter_length = fields.Float('长度L[mm]')
|
||||
# cutting_tool_parameter_width = fields.Float('宽度D[mm])')
|
||||
# cutting_tool_parameter_height = fields.Float('高度T[mm]')
|
||||
# cutting_tool_parameter_top_angle = fields.Float('顶角(°)')
|
||||
# cutting_tool_parameter_r_angle = fields.Float('R角(°)')
|
||||
# cutting_tool_parameter_working_hardness = fields.Char('加工硬度')
|
||||
# cutting_tool_parameter_cutter_bar_ids = fields.Many2many('sf.cutter.bar', 'rel_product_cutter_bar',
|
||||
# string='适用刀杆型号')
|
||||
# cutting_tool_parameter_cutter_pad_ids = fields.Many2many('sf.cutter.pad', 'rel_product_cutter_pad',
|
||||
# string='适用刀盘型号')
|
||||
# cutting_tool_parameter_radius = fields.Float('刀尖半径[mm]')
|
||||
# # 刀杆/刀盘参数
|
||||
# cutting_tool_parameter_c_diameter = fields.Float('C柄径[mm]')
|
||||
# cutting_tool_parameter_l_total_length = fields.Float('L总长[mm]')
|
||||
# cutting_tool_parameter_d_diameter = fields.Float('D刃径[mm]')
|
||||
# cutting_tool_parameter_blade_ids = fields.Many2many('sf.blade', 'rel_product_blade', string='适用刀片型号')
|
||||
# cutting_tool_parameter_wrench = fields.Float('配对扳手[mm]')
|
||||
# cutting_tool_parameter_screw = fields.Float('配备螺丝[mm]')
|
||||
# cutting_tool_parameter_accuracy_level = fields.Char('精度等级')
|
||||
# cutting_tool_parameter_rounded_corner = fields.Float('刀尖圆角半径[mm]')
|
||||
# cutting_tool_parameter_hardness = fields.Char('硬度(°)')
|
||||
# # 刀柄参数
|
||||
# cutting_tool_parameter_handle_length = fields.Float('L[mm]')
|
||||
# cutting_tool_parameter_length1 = fields.Float('L1[mm]')
|
||||
# cutting_tool_parameter_diameter1 = fields.Float('D1[mm]')
|
||||
# cutting_tool_parameter_weight = fields.Float('重量(kg)')
|
||||
# cutting_tool_parameter_body_accuracy = fields.Float('本体精度[mm]')
|
||||
# cutting_tool_parameter_clamping_range = fields.Float('夹持范围[mm]')
|
||||
# cutting_tool_parameter_detection_accuracy = fields.Float('检测精度')
|
||||
# cutting_tool_parameter_detection_hardness = fields.Float('检测硬度')
|
||||
# cutting_tool_parameter_standard_speed = fields.Float('标准转速')
|
||||
# # 夹头参数
|
||||
# cutting_tool_parameter_accuracy = fields.Float('精度[mm]')
|
||||
# cutting_tool_parameter_outer_diameter = fields.Float('外径[mm]')
|
||||
# cutting_tool_parameter_inner_diameter = fields.Float('内径[mm]')
|
||||
# cutting_tool_parameter_handle_model_ids = fields.Many2many('sf.handle.model', 'rel_product_handle_model',
|
||||
# string='适用刀柄型号')
|
||||
# cutting_tool_parameter_feature = fields.Char('特性')
|
||||
|
||||
# image_1920 = fields.Image(related='cutting_tool_parameter_image', store=True,
|
||||
# domain=[('cutting_tool_parameter_image', '!=', False)])
|
||||
|
||||
@@ -403,7 +326,7 @@ class ResProductTemplate(models.Model):
|
||||
vals['model_file'] = self.transition_glb_file(report_path, model_code)
|
||||
logging.info('create-model_file:%s' % len(vals['model_file']))
|
||||
self._sanitize_vals(vals)
|
||||
templates = super(ResProductTemplate, self).create(vals_list)
|
||||
templates = super(ResProduct, self).create(vals_list)
|
||||
if "create_product_product" not in self._context:
|
||||
templates._create_variant_ids()
|
||||
|
||||
@@ -415,7 +338,6 @@ class ResProductTemplate(models.Model):
|
||||
related_vals[field_name] = vals[field_name]
|
||||
if related_vals:
|
||||
template.write(related_vals)
|
||||
logging.info('create-model_file:%s' % templates.model_file)
|
||||
return templates
|
||||
|
||||
@api.onchange('upload_model_file')
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
attrs="{'invisible': ['|', ('categ_type', '!=', '成品'),('categ_type', '=', False)]}"/>
|
||||
</field>
|
||||
<field name="invoice_policy" position="after">
|
||||
<field name='cutting_tool' invisible="1"/>
|
||||
<field name='cutting_tool_type' invisible="1"/>
|
||||
<field name="embryo_model_type_id" string="模型类型"
|
||||
attrs="{'invisible': ['|',('categ_type', '!=', '坯料'),('categ_type', '=', False)]}"/>
|
||||
<field name="materials_id" string="材料"
|
||||
@@ -75,53 +75,53 @@
|
||||
<page string="刀具物料参数" attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
|
||||
<group>
|
||||
<!--整体式刀具-->
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', '!=', '整体式刀具')]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<field name="cutting_tool_parameter_brand_id"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '整体式刀具')],'required': [('cutting_tool', '=', '整体式刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'required': [('cutting_tool_type', '=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_parameter_total_length"/>
|
||||
<field name="cutting_tool_parameter_shank_length"/>
|
||||
<field name="cutting_tool_parameter_blade_length"/>
|
||||
<field name="cutting_tool_parameter_diameter"/>
|
||||
<field name="cutting_tool_parameter_nut"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '整体式刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_parameter_blade_number"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '整体式刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', '!=', '整体式刀具')]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<field name="cutting_tool_parameter_material_model_id"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '整体式刀具')],'required': [('cutting_tool', '=', '整体式刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'required': [('cutting_tool_type', '=', '整体式刀具')]}"/>
|
||||
/>
|
||||
<field name="cutting_tool_parameter_front_angle"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '整体式刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_parameter_rear_angle"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '整体式刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_parameter_main_included_angle"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '整体式刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', '!=', '整体式刀具')]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<field name="cutting_tool_parameter_chuck_model_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '整体式刀具')],'required': [('cutting_tool', '=', '整体式刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'required': [('cutting_tool_type', '=', '整体式刀具')]}"/>
|
||||
<field name="cutting_tool_parameter_scope"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '整体式刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
</group>
|
||||
<!--刀片-->
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', '!=', '刀片')]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '刀片')]}">
|
||||
<field name="cutting_tool_parameter_brand_id"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀片')],'required': [('cutting_tool', '=', '刀片')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'required': [('cutting_tool_type', '=', '刀片')]}"/>
|
||||
<field name="cutting_tool_parameter_top_angle"/>
|
||||
<field name="cutting_tool_parameter_front_angle"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀片')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_parameter_rear_angle"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀片')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_parameter_main_included_angle"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀片')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_parameter_r_angle"/>
|
||||
<field name="cutting_tool_parameter_working_hardness"
|
||||
attrs="{'required': [('cutting_tool', '=', '刀片')]}"/>
|
||||
attrs="{'required': [('cutting_tool_type', '=', '刀片')]}"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', '!=', '刀片')]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '刀片')]}">
|
||||
<field name="cutting_tool_parameter_material_model_id"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀片')],'required': [('cutting_tool', '=', '刀片')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'required': [('cutting_tool_type', '=', '刀片')]}"/>
|
||||
<label for="cutting_tool_parameter_length" string="尺寸[mm]"/>
|
||||
<div class="o_address_format">
|
||||
<label for="cutting_tool_parameter_length" string="长度L"/>
|
||||
@@ -129,23 +129,23 @@
|
||||
<label for="cutting_tool_parameter_width" string="宽度D"/>
|
||||
<field name="cutting_tool_parameter_width" class="o_address_zip"/>
|
||||
<label for="cutting_tool_parameter_height" string="高度T"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀片')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_parameter_height" class="o_address_zip"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀片')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
</div>
|
||||
<field name="cutting_tool_parameter_radius"/>
|
||||
<field name="cutting_tool_parameter_nut"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀片')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||
<field name="cutting_tool_parameter_cutter_bar_ids" widget="many2many_tags"
|
||||
attrs="{'required': [('cutting_tool', '=', '刀片')]}"/>
|
||||
attrs="{'required': [('cutting_tool_type', '=', '刀片')]}"/>
|
||||
<field name="cutting_tool_parameter_cutter_pad_ids" widget="many2many_tags"
|
||||
attrs="{'required': [('cutting_tool', '=', '刀片')]}"/>
|
||||
attrs="{'required': [('cutting_tool_type', '=', '刀片')]}"/>
|
||||
</group>
|
||||
|
||||
<!--刀杆/刀盘-->
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', 'not in', ['刀杆','刀盘'])]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', 'not in', ['刀杆','刀盘'])]}">
|
||||
<field name="cutting_tool_parameter_brand_id"
|
||||
attrs="{'invisible': [('cutting_tool', 'not in', ['刀杆','刀盘'])],'required': [('cutting_tool', 'not in', ['刀杆','刀盘'])]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ['刀杆','刀盘'])],'required': [('cutting_tool_type', 'not in', ['刀杆','刀盘'])]}"/>
|
||||
<field name="cutting_tool_parameter_c_diameter"/>
|
||||
<field name="cutting_tool_parameter_d_diameter"/>
|
||||
<field name="cutting_tool_parameter_l_total_length"/>
|
||||
@@ -153,60 +153,60 @@
|
||||
<field name="cutting_tool_parameter_screw"/>
|
||||
<field name="cutting_tool_parameter_blade_ids" widget="many2many_tags"/>
|
||||
<field name="cutting_tool_parameter_scope"
|
||||
attrs="{'invisible': [('cutting_tool', 'not in', ['刀杆','刀盘'])]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ['刀杆','刀盘'])]}"/>
|
||||
|
||||
</group>
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', 'not in', ['刀杆','刀盘'])]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', 'not in', ['刀杆','刀盘'])]}">
|
||||
<field name="cutting_tool_parameter_material_model_id"
|
||||
attrs="{'invisible': [('cutting_tool', 'not in', ['刀杆','刀盘'])],'required': [('cutting_tool', 'not in', ['刀杆','刀盘'])]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ['刀杆','刀盘'])],'required': [('cutting_tool_type', 'not in', ['刀杆','刀盘'])]}"/>
|
||||
<field name="cutting_tool_parameter_rounded_corner"/>
|
||||
<field name="cutting_tool_parameter_accuracy_level"/>
|
||||
<field name="cutting_tool_parameter_blade_number"
|
||||
attrs="{'invisible': [('cutting_tool', 'not in', ['刀杆','刀盘'])]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ['刀杆','刀盘'])]}"/>
|
||||
<field name="cutting_tool_parameter_hardness"/>
|
||||
</group>
|
||||
<!--刀柄-->
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', '!=', '刀柄')]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '刀柄')]}">
|
||||
<field name="cutting_tool_parameter_brand_id"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀柄')],'required': [('cutting_tool', '=', '刀柄')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'required': [('cutting_tool_type', '=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_parameter_handle_length"/>
|
||||
<field name="cutting_tool_parameter_length1"/>
|
||||
<field name="cutting_tool_parameter_diameter1"/>
|
||||
<field name="cutting_tool_parameter_body_accuracy"/>
|
||||
<field name="cutting_tool_parameter_nut"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀柄')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_parameter_clamping_range"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀柄')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_parameter_weight"/>
|
||||
<field name="cutting_tool_parameter_chuck_model_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀柄')],'required': [('cutting_tool', '=', '刀柄')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'required': [('cutting_tool_type', '=', '刀柄')]}"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', '!=', '刀柄')]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '刀柄')]}">
|
||||
<field name="cutting_tool_parameter_material_model_id"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '刀柄')],'required': [('cutting_tool', '=', '刀柄')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'required': [('cutting_tool_type', '=', '刀柄')]}"/>
|
||||
<field name="cutting_tool_parameter_detection_accuracy"/>
|
||||
<field name="cutting_tool_parameter_detection_hardness"/>
|
||||
<field name="cutting_tool_parameter_standard_speed"/>
|
||||
</group>
|
||||
<!--夹头-->
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', '!=', '夹头')]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '夹头')]}">
|
||||
<field name="cutting_tool_parameter_brand_id"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '夹头')],'required': [('cutting_tool', '=', '夹头')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'required': [('cutting_tool_type', '=', '夹头')]}"/>
|
||||
<field name="cutting_tool_parameter_outer_diameter"/>
|
||||
<field name="cutting_tool_parameter_inner_diameter"/>
|
||||
<field name="cutting_tool_parameter_accuracy"/>
|
||||
<field name="cutting_tool_parameter_nut"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '夹头')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cutting_tool_parameter_clamping_range"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '夹头')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cutting_tool_parameter_handle_model_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '夹头')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool', '!=', '夹头')]}">
|
||||
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '夹头')]}">
|
||||
<field name="cutting_tool_parameter_material_model_id"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '夹头')],'required': [('cutting_tool', '=', '夹头')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'required': [('cutting_tool_type', '=', '夹头')]}"/>
|
||||
<field name="cutting_tool_parameter_height" string="高度[mm]"
|
||||
attrs="{'invisible': [('cutting_tool', '!=', '夹头')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||
<field name="cutting_tool_parameter_feature"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user