Accept Merge Request #909: (feature/优化产品模版 -> develop)

Merge Request: 优化产品模版

Created By: @杨金灵
Reviewed By: @马广威
Approved By: @马广威 
Accepted By: @杨金灵
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/909
This commit is contained in:
杨金灵
2024-03-18 15:01:20 +08:00
committed by Coding
3 changed files with 4 additions and 3 deletions

View File

@@ -124,7 +124,7 @@
<field name="arch" type="xml">
<form string="规则">
<sheet>
<field name="cutting_tool_type" invisible="0"/>
<field name="cutting_tool_type" invisible="1"/>
<field name="standard_library_id" invisible="1"/>
<group>
<group attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">

View File

@@ -123,10 +123,10 @@
<form string="刀具标准库" delete="0" create="0" edit="0">
<sheet>
<field name="image" widget='image' class="oe_avatar"
options="{'zoom': true, 'preview_image':'image_128'}" required="1"/>
required="1"/>
<div class="oe_title">
<h1>
<field name="code" readonly="1"/>
<field name="code" readonly="1" force_save="1"/>
</h1>
</div>
<group>

View File

@@ -331,6 +331,7 @@ class ResProductMo(models.Model):
(6, 0, self.cutting_tool_model_id.suitable_coolant_ids.ids)]
self.compaction_way_id = self.cutting_tool_model_id.compaction_way_id.id
self.fit_blade_shape_id = self.cutting_tool_model_id.fit_blade_shape_id.id
self.image_1920 = self.cutting_tool_model_id.image
else:
self.cutting_tool_type_id = False
self.brand_id = False