产品新增搜索面板

This commit is contained in:
jinling.yang
2023-08-01 15:08:32 +08:00
parent a4f511b47b
commit 7c8e470199
3 changed files with 12 additions and 8 deletions

View File

@@ -29,7 +29,7 @@ class FixtureModel(models.Model):
code = fields.Char(string='编码')
name = fields.Char(string="名称", size=15)
fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料", )
fixture_material_type = fields.Char(string="夹具物料类型", related='fixture_material_id.name')
fixture_material_type = fields.Char(string="夹具物料类型", related='fixture_material_id.name', store=True)
multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型")
brand_id = fields.Many2one('sf.machine.brand', string="品牌")
manufacturer_model_number = fields.Char(string="厂家型号")

View File

@@ -197,15 +197,13 @@
attrs='{"invisible": [("fixture_material_type","not in",("气动托盘","转接板(锁板)托盘","磁吸托盘","虎钳托盘","零点卡盘"))]}'>
<group>
<label for="length" string="尺寸[mm]"/>
<div class="o_address_format">
<div class="test_model">
<label for="length" string="长"/>
<field name="length" class="o_address_zip"
options="{'format': false}"/>
<span>&amp;nbsp;</span>
<label for="width" string="宽"/>
<field name="width" class="o_address_zip"
options="{'format': false}"/>
<span>&amp;nbsp;</span>
<label for="height" string="高"/>
<field name="height" class="o_address_zip"
options="{'format': false}"/>
@@ -213,18 +211,16 @@
<field name="weight"></field>
<label for="length" string="夹持工件最大尺寸[mm]"
attrs='{"invisible": [("fixture_material_type","=",("零点卡盘"))]}'/>
<div class="o_address_format"
<div class="test_model"
attrs='{"invisible": [("fixture_material_type","=",("零点卡盘"))]}'>
<label for="clamp_workpiece_length_max" string="长"/>
<field name="clamp_workpiece_length_max" class="o_address_zip"
options="{'format': false}"
attrs="{'required': [('fixture_material_type', 'in',('气动托盘','转接板(锁板)托盘','磁吸托盘','虎钳托盘'))]}"/>
<span>&amp;nbsp;</span>
<label for="clamp_workpiece_width_max" string="宽"/>
<field name="clamp_workpiece_width_max" class="o_address_zip"
options="{'format': false}"
attrs="{'required': [('fixture_material_type', 'in',('气动托盘','转接板(锁板)托盘','磁吸托盘','虎钳托盘'))]}"/>
<span>&amp;nbsp;</span>
<label for="clamp_workpiece_height_max" string="高"/>
<field name="clamp_workpiece_height_max" class="o_address_zip"
options="{'format': false}"

View File

@@ -355,6 +355,14 @@
<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','=','原材料')]"/>
<!-- <searchpanel>-->
<!-- <field name="categ_id" icon="fa-building" enable_counters="1"/>-->
<!-- </searchpanel>-->
</xpath>
<xpath expr="//search" position="inside">
<searchpanel>
<field name="categ_id" icon="fa-building" enable_counters="1"/>
</searchpanel>
</xpath>
</field>
</record>