新增零件名称
This commit is contained in:
@@ -15,6 +15,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_name' attrs="{'invisible': [('categ_type', '!=', '成品')]}"/>
|
||||
<field name='part_number' attrs="{'invisible': [('categ_type', '!=', '成品')]}"/>
|
||||
<field name='manual_quotation' attrs="{'invisible':[('upload_model_file', '=', [])]}"/>
|
||||
<field name="upload_model_file"
|
||||
@@ -110,13 +111,13 @@
|
||||
</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//sheet//notebook" position="inside">
|
||||
<page string="2D加工图纸">
|
||||
<page string="2D加工图纸" attrs="{'invisible': [('categ_type', '!=', '成品')]}">
|
||||
<field name='machining_drawings' attrs="{'invisible': [('categ_type', '!=', '成品')]}"
|
||||
widget="adaptive_viewer"/>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//sheet//notebook" position="inside">
|
||||
<page string="质检标准">
|
||||
<page string="质检标准" attrs="{'invisible': [('categ_type', '!=', '成品')]}">
|
||||
<field name='quality_standard' attrs="{'invisible': [('categ_type', '!=', '成品')]}"
|
||||
widget="adaptive_viewer"/>
|
||||
|
||||
|
||||
@@ -148,6 +148,8 @@ class MrpProduction(models.Model):
|
||||
|
||||
quality_standard = fields.Binary('质检标准', related='product_id.quality_standard', readonly=True)
|
||||
|
||||
part_name = fields.Char(string='零件名称', related='product_id.part_name', readonly=True)
|
||||
|
||||
@api.depends('product_id.manual_quotation')
|
||||
def _compute_manual_quotation(self):
|
||||
for item in self:
|
||||
|
||||
@@ -228,6 +228,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
part_number = fields.Char(related='production_id.part_number', string='零件图号')
|
||||
machining_drawings = fields.Binary('2D加工图纸', related='production_id.part_drawing', readonly=True)
|
||||
quality_standard = fields.Binary('质检标准', related='production_id.quality_standard', readonly=True)
|
||||
part_name = fields.Char(related='production_id.part_name', string='零件名称')
|
||||
|
||||
# 工序状态
|
||||
process_state = fields.Selection([
|
||||
|
||||
@@ -777,6 +777,7 @@ class ResProductMo(models.Model):
|
||||
part_number = fields.Char(string='零件图号', readonly=True)
|
||||
machining_drawings = fields.Binary('2D加工图纸', readonly=True)
|
||||
quality_standard = fields.Binary('质检标准', readonly=True)
|
||||
part_name = fields.Char(string='零件名称', readonly=True)
|
||||
|
||||
@api.constrains('tool_length')
|
||||
def _check_tool_length_size(self):
|
||||
@@ -884,6 +885,7 @@ class ResProductMo(models.Model):
|
||||
'machining_drawings': '' if not item['machining_drawings'] else base64.b64decode(
|
||||
item['machining_drawings']),
|
||||
'quality_standard': '' if not item['quality_standard'] else base64.b64decode(item['quality_standard']),
|
||||
'part_name': item['part_name'],
|
||||
}
|
||||
tax_id = self.env['account.tax'].sudo().search(
|
||||
[('type_tax_use', '=', 'sale'), ('amount', '=', item.get('tax')), ('price_include', '=', 'True')])
|
||||
|
||||
@@ -97,6 +97,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_name"/>
|
||||
<field name="part_number" string="成品的零件图号"/>
|
||||
<field name="tool_state"/>
|
||||
<field name="tool_state_remark" string="备注" attrs="{'invisible': [('tool_state', '!=', '1')]}"/>
|
||||
|
||||
@@ -281,6 +281,7 @@
|
||||
<label for="material_height" string="高"/>
|
||||
<field name="material_height" class="o_address_zip"/>
|
||||
</div>
|
||||
<field name="part_name"/>
|
||||
<field name="part_number" string="成品的零件图号"/>
|
||||
</xpath>
|
||||
<xpath expr="//label[1]" position="attributes">
|
||||
|
||||
@@ -33,6 +33,7 @@ class SfQualityCncTest(models.Model):
|
||||
|
||||
machining_drawings = fields.Binary('2D加工图纸', related='workorder_id.machining_drawings', readonly=True)
|
||||
quality_standard = fields.Binary('质检标准', related='workorder_id.quality_standard', readonly=True)
|
||||
part_name = fields.Char(related='workorder_id.part_name', string='零件名称')
|
||||
|
||||
def submit_pass(self):
|
||||
if self.test_results in ['返工', '报废']:
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
<field name="model_file" widget="Viewer3D"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="part_name"/>
|
||||
<field name="part_number"/>
|
||||
<field name="processing_panel"/>
|
||||
</group>
|
||||
|
||||
@@ -228,6 +228,7 @@ class QuickEasyOrder(models.Model):
|
||||
'quality_standard_mimetype': '',
|
||||
'machining_drawings': item.machining_drawings,
|
||||
'quality_standard': '',
|
||||
'part_name': '',
|
||||
})
|
||||
# res['bfm_process_order_list'] = json.dumps(res['bfm_process_order_list'])
|
||||
product_id = self.env.ref('sf_dlm.product_template_sf').sudo()
|
||||
|
||||
Reference in New Issue
Block a user