Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造功能优化
This commit is contained in:
@@ -85,6 +85,18 @@ class QualityCheck(models.Model):
|
||||
raise ValidationError('请填写【判定结果】里的信息')
|
||||
if self.test_results == '合格':
|
||||
raise ValidationError('请重新选择【判定结果】-【检测结果】')
|
||||
if self.workorder_id.routing_type != 'CNC加工' and self.workorder_id.individuation_page_PTD is False:
|
||||
self.workorder_id.production_id.write({'detection_result_ids': [(0, 0, {
|
||||
'rework_reason': self.workorder_id.reason,
|
||||
'detailed_reason': self.workorder_id.detailed_reason,
|
||||
'processing_panel': self.workorder_id.processing_panel,
|
||||
'routing_type': self.workorder_id.routing_type,
|
||||
'handle_result': '待处理' if (self.workorder_id.test_results in ['返工', '报废']
|
||||
or self.workorder_id.is_rework is True) else '',
|
||||
'test_results': self.workorder_id.test_results,
|
||||
'test_report': self.workorder_id.detection_report})],
|
||||
'is_scrap': True if self.workorder_id.test_results == '报废' else False
|
||||
})
|
||||
if self.workorder_id.state not in ['done']:
|
||||
self.workorder_id.write(
|
||||
{'test_results': self.test_results, 'reason': self.reason, 'detailed_reason': self.detailed_reason})
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
<field name="inherit_id" ref="quality_control.quality_check_view_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree//field[@name='name']" position="after">
|
||||
<field name="title" string="标准名"/>
|
||||
<field name="operation_id" invisible="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
@@ -89,8 +90,15 @@
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='product_id']" position="after">
|
||||
<field name="production_id"/>
|
||||
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="quality_control.quality_check_action_main" model="ir.actions.act_window">
|
||||
<field name="context">{
|
||||
'is_web_request': True,
|
||||
'search_default_progress': 1,
|
||||
'search_default_passed': 1,
|
||||
'search_default_failed': 1,
|
||||
}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user