bom组件的公斤数量修复,产品页面的模型根据类型隐藏
This commit is contained in:
@@ -237,7 +237,7 @@ class ResMrpBom(models.Model):
|
||||
'bom_id': self.id,
|
||||
'product_id': raw_bom_line.id,
|
||||
'product_tmpl_id': raw_bom_line.product_tmpl_id.id,
|
||||
'product_qty': round(embryo.volume / 1000000000 * raw_bom_line.materials_type_id.density, 2),
|
||||
'product_qty': round(embryo.volume * raw_bom_line.materials_type_id.density / 1000000),
|
||||
'product_uom_id': raw_bom_line.uom_id.id,
|
||||
})
|
||||
return bom_line
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
<!-- <field name="upload_model_file" required="True"-->
|
||||
<!-- widget='many2many_binary'/>-->
|
||||
<!-- </field>-->
|
||||
|
||||
<field name="invoice_policy" position="after">
|
||||
<!-- <field name="model_file" widget="model_viewer"-->
|
||||
<!-- attrs="{'invisible': [('categ_type', '!=', '成品')]}"/>-->
|
||||
<!-- <field name="embryo_model_type_id" string="模型类型"-->
|
||||
<!-- attrs="{'invisible': [('categ_type', '=', '胚料')]}"/>-->
|
||||
<field name='categ_type' invisible="1"/>
|
||||
<field name="model_file" widget="model_viewer"
|
||||
attrs="{'invisible': [('categ_type', '!=', '成品')]}"/>
|
||||
<field name="embryo_model_type_id" string="模型类型"
|
||||
attrs="{'invisible': [('categ_type', '!=', '胚料')]}"/>
|
||||
<field name="materials_id" string="材料"/>
|
||||
<field name="materials_type_id" string="型号"
|
||||
domain="[('materials_id', '=', materials_id)]"/>
|
||||
|
||||
Reference in New Issue
Block a user