Files
test/sf_dlm/views/product_template_view.xml
2023-06-29 11:15:40 +08:00

289 lines
21 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record model="ir.ui.view" id="view_product_template_form_inherit_sf">
<field name="name">product.template.form.inherit.sf</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="sale.product_template_form_view"/>
<field name="arch" type="xml">
<field name="detailed_type" 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)]}"/>
</field>
<field name="invoice_policy" position="after">
<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="材料"
attrs="{'invisible': ['|',('categ_type', '=', '表面工艺'),('categ_type', '=', '刀具')]}"/>
<field name="materials_type_id" string="型号"
domain="[('materials_id', '=', materials_id)]"
attrs="{'invisible': ['|',('categ_type', '=', '表面工艺'),('categ_type', '=', '刀具')]}"/>
<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', '!=', '刀具')]}"/>
<field name="cutting_tool_model_id"
attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
domain="[('mrs_cutting_tool_material_id','=',cutting_tool_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>&amp;nbsp;</span>
<label for="width" string="宽"/>
<field name="width" class="o_address_zip"/>
<span>&amp;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[last()-1]" position="after">
<page string="刀具物料参数" attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
<group>
<!--整体式刀具-->
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '整体式刀具')]}">
<field name="cutting_tool_parameter_brand_id"
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_type', '!=', '整体式刀具')]}"/>
<field name="cutting_tool_parameter_blade_number"
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
</group>
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '整体式刀具')]}">
<field name="cutting_tool_parameter_material_model_id"
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'required': [('cutting_tool_type', '=', '整体式刀具')]}"/>
/>
<field name="cutting_tool_parameter_front_angle"
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
<field name="cutting_tool_parameter_rear_angle"
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
<field name="cutting_tool_parameter_main_included_angle"
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
</group>
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '整体式刀具')]}">
<field name="cutting_tool_parameter_chuck_model_ids" widget="many2many_tags"
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'required': [('cutting_tool_type', '=', '整体式刀具')]}"/>
<field name="cutting_tool_parameter_scope"
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
</group>
<!--刀片-->
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '刀片')]}">
<field name="cutting_tool_parameter_brand_id"
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_type', '!=', '刀片')]}"/>
<field name="cutting_tool_parameter_rear_angle"
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
<field name="cutting_tool_parameter_main_included_angle"
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
<field name="cutting_tool_parameter_r_angle"/>
<field name="cutting_tool_parameter_working_hardness"
attrs="{'required': [('cutting_tool_type', '=', '刀片')]}"/>
</group>
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '刀片')]}">
<field name="cutting_tool_parameter_material_model_id"
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"/>
<field name="cutting_tool_parameter_length" class="o_address_zip"/>
<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_type', '!=', '刀片')]}"/>
<field name="cutting_tool_parameter_height" class="o_address_zip"
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
</div>
<field name="cutting_tool_parameter_radius"/>
<field name="cutting_tool_parameter_nut"
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
<field name="cutting_tool_parameter_cutter_bar_ids" widget="many2many_tags"
attrs="{'required': [('cutting_tool_type', '=', '刀片')]}"/>
<field name="cutting_tool_parameter_cutter_pad_ids" widget="many2many_tags"
attrs="{'required': [('cutting_tool_type', '=', '刀片')]}"/>
</group>
<!--刀杆/刀盘-->
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', 'not in', ['刀杆','刀盘'])]}">
<field name="cutting_tool_parameter_brand_id"
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"/>
<field name="cutting_tool_parameter_wrench"/>
<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_type', 'not in', ['刀杆','刀盘'])]}"/>
</group>
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', 'not in', ['刀杆','刀盘'])]}">
<field name="cutting_tool_parameter_material_model_id"
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_type', 'not in', ['刀杆','刀盘'])]}"/>
<field name="cutting_tool_parameter_hardness"/>
</group>
<!--刀柄-->
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '刀柄')]}">
<field name="cutting_tool_parameter_brand_id"
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_type', '!=', '刀柄')]}"/>
<field name="cutting_tool_parameter_clamping_range"
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_type', '!=', '刀柄')],'required': [('cutting_tool_type', '=', '刀柄')]}"/>
</group>
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '刀柄')]}">
<field name="cutting_tool_parameter_material_model_id"
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_type', '!=', '夹头')]}">
<field name="cutting_tool_parameter_brand_id"
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_type', '!=', '夹头')]}"/>
<field name="cutting_tool_parameter_clamping_range"
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
<field name="cutting_tool_parameter_handle_model_ids" widget="many2many_tags"
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
</group>
<group attrs="{'invisible': ['|',('categ_type', '!=', '刀具'),('cutting_tool_type', '!=', '夹头')]}">
<field name="cutting_tool_parameter_material_model_id"
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'required': [('cutting_tool_type', '=', '夹头')]}"/>
<field name="cutting_tool_parameter_height" string="高度[mm]"
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
<field name="cutting_tool_parameter_feature"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
<record id="view_product_category_form_inherit_sf" model="ir.ui.view">
<field name="name">product.category.form.inherit.sf</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml">
<field name="parent_id" position="before">
<field name="type"/>
</field>
</field>
</record>
<record id="view_template_property_form" model="ir.ui.view">
<field name="name">product.template.stock.property.form.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='group_lots_and_weight']" position="after">
<group string="订单规则">
<field name="single_manufacturing" string="单个制造" widget="checkbox"/>
</group>
</xpath>
<page name="inventory" position="inside">
<group>
<group string="Description for Receipts">
<field name="description_pickingin" nolabel="1"
placeholder="This note is added to receipt orders (e.g. where to store the product in the warehouse)."/>
</group>
<group string="Description for Delivery Orders">
<field name="description_pickingout" nolabel="1"
placeholder="This note is added to delivery orders."/>
</group>
<group string="Description for Internal Transfers" groups="stock.group_stock_multi_locations">
<field name="description_picking"
placeholder="This note is added to internal transfer orders (e.g. where to pick the product in the warehouse)."
nolabel="1"/>
</group>
</group>
</page>
<page name="inventory" position="attributes">
<attribute name="groups">stock.group_stock_user,product.group_stock_packaging</attribute>
</page>
</field>
</record>
<record id="view_mrp_bom_form_inherit_sf" model="ir.ui.view">
<field name="name">mrp.bom.form.inherit.sf</field>
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp_subcontracting.mrp_bom_form_view"/>
<field name="arch" type="xml">
<field name="subcontractor_ids" position="replace">
<field name="subcontractor_id"
attrs="{'invisible': [('type', '!=', 'subcontract')], 'required': [('type', '=', 'subcontract')]}"/>
</field>
</field>
</record>
<record id="product_template_search_view_sf" model="ir.ui.view">
<field name="name">product.template.search</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='consumable']" position="after">
<separator/>
<filter name="finish_product" string="成品" domain="[('categ_id.type','=','成品')]"/>
<filter name="embryo" string="坯料" domain="[('categ_id.type','=','坯料')]"/>
<filter name="raw_bom" string="原材料" domain="[('categ_id.type','=','原材料')]"/>
</xpath>
</field>
</record>
</data>
</odoo>