辅助文件上传
This commit is contained in:
@@ -118,10 +118,12 @@ class MrpProduction(models.Model):
|
|||||||
], string='工序状态', default='待装夹')
|
], string='工序状态', default='待装夹')
|
||||||
|
|
||||||
# 零件图号
|
# 零件图号
|
||||||
part_number = fields.Char('零件图号')
|
part_number = fields.Char('零件图号', readonly=True)
|
||||||
|
|
||||||
# 上传零件图纸
|
# 上传零件图纸
|
||||||
part_drawing = fields.Binary('零件图纸')
|
part_drawing = fields.Binary('零件图纸', readonly=True)
|
||||||
|
|
||||||
|
quality_standard = fields.Binary('质检标准', readonly=True)
|
||||||
|
|
||||||
@api.depends('product_id.manual_quotation')
|
@api.depends('product_id.manual_quotation')
|
||||||
def _compute_manual_quotation(self):
|
def _compute_manual_quotation(self):
|
||||||
|
|||||||
@@ -225,6 +225,9 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
material_height = fields.Float(string='高')
|
material_height = fields.Float(string='高')
|
||||||
# 零件图号
|
# 零件图号
|
||||||
part_number = fields.Char(related='production_id.part_number', string='零件图号')
|
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)
|
||||||
|
|
||||||
# 工序状态
|
# 工序状态
|
||||||
process_state = fields.Selection([
|
process_state = fields.Selection([
|
||||||
('待装夹', '待装夹'),
|
('待装夹', '待装夹'),
|
||||||
|
|||||||
@@ -272,6 +272,10 @@ class StockRule(models.Model):
|
|||||||
if quick_easy_order:
|
if quick_easy_order:
|
||||||
production.write({'part_number': quick_easy_order.part_drawing_number,
|
production.write({'part_number': quick_easy_order.part_drawing_number,
|
||||||
'part_drawing': quick_easy_order.machining_drawings})
|
'part_drawing': quick_easy_order.machining_drawings})
|
||||||
|
else:
|
||||||
|
production.write({'part_number': production.product_id.part_number,
|
||||||
|
'part_drawing': production.product_id.machining_drawings,
|
||||||
|
'quality_standard': production.product_id.quality_standard})
|
||||||
if sale_order:
|
if sale_order:
|
||||||
# sale_order.write({'schedule_status': 'to schedule'})
|
# sale_order.write({'schedule_status': 'to schedule'})
|
||||||
self.env['sf.production.plan'].sudo().with_company(company_id).create({
|
self.env['sf.production.plan'].sudo().with_company(company_id).create({
|
||||||
|
|||||||
@@ -98,7 +98,8 @@
|
|||||||
<field name="production_line_id" readonly="1"/>
|
<field name="production_line_id" readonly="1"/>
|
||||||
<!-- <field name="production_line_state" readonly="1"/>-->
|
<!-- <field name="production_line_state" readonly="1"/>-->
|
||||||
<field name="part_number" string="成品的零件图号"/>
|
<field name="part_number" string="成品的零件图号"/>
|
||||||
<field name="part_drawing"/>
|
<field name="part_drawing" widget="image"/>
|
||||||
|
<field name="quality_standard"/>
|
||||||
<field name="tool_state"/>
|
<field name="tool_state"/>
|
||||||
<field name="tool_state_remark" string="备注" attrs="{'invisible': [('tool_state', '!=', '1')]}"/>
|
<field name="tool_state_remark" string="备注" attrs="{'invisible': [('tool_state', '!=', '1')]}"/>
|
||||||
<field name="tool_state_remark2" invisible="1"/>
|
<field name="tool_state_remark2" invisible="1"/>
|
||||||
|
|||||||
@@ -268,6 +268,8 @@
|
|||||||
<field name="material_height" class="o_address_zip"/>
|
<field name="material_height" class="o_address_zip"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="part_number" string="成品的零件图号"/>
|
<field name="part_number" string="成品的零件图号"/>
|
||||||
|
<field name="machining_drawings" widget="image" attrs="{'invisible': [('routing_type', '!=', 'CNC加工')]}"/>
|
||||||
|
<field name="quality_standard" attrs="{'invisible': [('routing_type', '!=', 'CNC加工')]}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//label[1]" position="attributes">
|
<xpath expr="//label[1]" position="attributes">
|
||||||
<attribute name="string">计划加工时间</attribute>
|
<attribute name="string">计划加工时间</attribute>
|
||||||
|
|||||||
Reference in New Issue
Block a user