工序增加唯一编码,是否重复,排序;用xml代码生成CNC加工的标准工序;

产品增加模型类型对象和加工的面,包括胚料增加的尺寸
This commit is contained in:
jinling.yang
2022-10-25 17:30:13 +08:00
parent 9ee33ae0b9
commit c3a7a6c4d6
8 changed files with 162 additions and 41 deletions

View File

@@ -7,51 +7,67 @@
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//page[last()]" position="after">
<page string="CNC加工">
<group string="模型">
<group>
<page string="加工参数">
<group>
<group string="模型">
<field name="model_long"/>
<field name="model_width"/>
<field name="model_height"/>
<field name="model_volume"/>
</group>
<group>
<field name="model_type_id"/>
<field name="processing_panel" placeholder="例如A,B"/>
<field name="model_precision"/>
<field name="model_materials_id"/>
<field name="model_materials_type_id"/>
<field name="model_materials_type_id"
domain="[('materials_id', '=', model_materials_id)]"/>
</group>
<group string="胚料">
<field name="embryo_long"/>
<field name="embryo_width"/>
<field name="embryo_height"/>
<field name="volume" string="体积[mm³]"/>
<field name="embryo_materials_id"/>
<field name="embryo_materials_type_id"
domain="[('materials_id', '=',embryo_materials_id)]"/>
</group>
</group>
</page>
</xpath>
<xpath expr="//label[@for='volume']" position="before">
<label for="embryo_long" 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="embryo_long" string="长"/>
<field name="embryo_long" class="o_address_zip"/>
<span>&amp;nbsp;</span>
<label for="embryo_width" string="宽"/>
<field name="embryo_width" class="o_address_zip"/>
<span>&amp;nbsp;</span>
<label for="embryo_height" string="高"/>
<field name="embryo_height" class="o_address_zip"/>
</div>
</xpath>
<xpath expr="//label[@for='produce_delay']" position="before">
<label for="embryo_materials_id"
attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>
<div class="o_row"
attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}">
<field name="embryo_materials_id"/>
</div>
<label for="embryo_materials_type_id"
attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>
<div class="o_row"
attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}">
<field name="embryo_materials_type_id" domain="[('materials_id', '=', embryo_materials_id)]"/>
</div>
</xpath>
<!-- <xpath expr="//label[@for='volume']" position="before">-->
<!-- <label for="embryo_long" 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="embryo_long" string="长"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>-->
<!-- <field name="embryo_long" class="o_address_zip"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="embryo_width" string="宽"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>-->
<!-- <field name="embryo_width" class="o_address_zip"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="embryo_height" string="高"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>-->
<!-- <field name="embryo_height" class="o_address_zip"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>-->
<!-- </div>-->
<!-- </xpath>-->
<!-- <xpath expr="//label[@for='produce_delay']" position="before">-->
<!-- <label for="embryo_materials_id"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>-->
<!-- <div class="o_row"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}">-->
<!-- <field name="embryo_materials_id"/>-->
<!-- </div>-->
<!-- <label for="embryo_materials_type_id"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>-->
<!-- <div class="o_row"-->
<!-- attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}">-->
<!-- <field name="embryo_materials_type_id" domain="[('materials_id', '=', embryo_materials_id)]"/>-->
<!-- </div>-->
<!-- </xpath>-->
</field>
</record>