1、产品的成品、制造订单、工单添加零件图号字段;

This commit is contained in:
yuxianghui
2024-06-06 14:38:10 +08:00
parent d213a2cf54
commit 002727070d
4 changed files with 5 additions and 2 deletions

View File

@@ -10,6 +10,7 @@
<field name='categ_id' class="custom_required" attrs="{'readonly': [('id', '!=', False)]}"/>
<field name='is_bfm' invisible="1"/>
<field name='categ_type' invisible="1"/>
<field name='part_number' attrs="{'invisible': [('categ_type', '!=', '成品')]}"/>
<field name='manual_quotation' attrs="{'invisible':[('upload_model_file', '=', [])]}"/>
<field name="upload_model_file"
widget="many2many_binary"

View File

@@ -530,6 +530,7 @@ class ResProductMo(models.Model):
# bfm下单
manual_quotation = fields.Boolean('人工编程', default=False, readonly=True)
part_number = fields.Char(string='零件图号', readonly=True)
@api.constrains('tool_length')
def _check_tool_length_size(self):
@@ -626,6 +627,7 @@ class ResProductMo(models.Model):
'model_remark': item['remark'],
'default_code': '%s-%s' % (order_number, i),
'manual_quotation': item['manual_quotation'] or False,
'part_number': item['part_number'] or '',
'active': True,
}
copy_product_id.sudo().write(vals)

View File

@@ -87,7 +87,7 @@
<xpath expr="//field[@name='user_id']" position="after">
<field name="production_line_id" readonly="1"/>
<field name="production_line_state" readonly="1"/>
<field name="part_number"/>
<field name="part_number" string="成品的零件图号"/>
<field name="part_drawing"/>
</xpath>
<xpath expr="//header//button[@name='action_cancel']" position="replace">

View File

@@ -573,7 +573,7 @@
<label for="material_height" string="高"/>
<field name="material_height" class="o_address_zip"/>
</div>
<field name="part_number"/>
<field name="part_number" string="成品的零件图号"/>
</xpath>
</field>
</record>