Accept Merge Request #1083: (feature/优化预调装夹工单 -> develop)
Merge Request: 优化预调装夹工单 Created By: @杨金灵 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @杨金灵 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1083?initial=true
This commit is contained in:
@@ -205,6 +205,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
[("programming", "编程"), ("clamping", "返工"), ("cutter", "刀具"), ("operate computer", "操机"),
|
[("programming", "编程"), ("clamping", "返工"), ("cutter", "刀具"), ("operate computer", "操机"),
|
||||||
("technology", "工艺"), ("customer redrawing", "客户改图"), ("other", "其他"), ], string="原因", tracking=True)
|
("technology", "工艺"), ("customer redrawing", "客户改图"), ("other", "其他"), ], string="原因", tracking=True)
|
||||||
detailed_reason = fields.Text('详细原因')
|
detailed_reason = fields.Text('详细原因')
|
||||||
|
is_send_program_again = fields.Boolean(string='是否重新下发NC程序', default=False)
|
||||||
|
|
||||||
@api.onchange('rfid_code')
|
@api.onchange('rfid_code')
|
||||||
def _onchange(self):
|
def _onchange(self):
|
||||||
@@ -1078,6 +1079,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
r = r.json()
|
r = r.json()
|
||||||
result = json.loads(r['result'])
|
result = json.loads(r['result'])
|
||||||
if result['status'] == 1:
|
if result['status'] == 1:
|
||||||
|
self.write({'is_send_program_again': True})
|
||||||
self.production_id.write({'work_state': '编程中', 'programming_state': '编程中'})
|
self.production_id.write({'work_state': '编程中', 'programming_state': '编程中'})
|
||||||
else:
|
else:
|
||||||
raise UserError(result['message'])
|
raise UserError(result['message'])
|
||||||
|
|||||||
@@ -117,6 +117,7 @@
|
|||||||
<field name='user_permissions' invisible="1"/>
|
<field name='user_permissions' invisible="1"/>
|
||||||
<field name='name' invisible="1"/>
|
<field name='name' invisible="1"/>
|
||||||
<field name='is_delivery' invisible="1"/>
|
<field name='is_delivery' invisible="1"/>
|
||||||
|
<field name='is_send_program_again' invisible="1"/>
|
||||||
<!-- 工单form页面的开始停工按钮等 -->
|
<!-- 工单form页面的开始停工按钮等 -->
|
||||||
<!-- <button name="button_start" type="object" string="开始" class="btn-success" -->
|
<!-- <button name="button_start" type="object" string="开始" class="btn-success" -->
|
||||||
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'not in', ('pending_processing', 'pending_cam', 'pending_era_cam')), ('state','!=','ready'), ('routing_type', 'not in', ('装夹预调', 'CNC加工', '解除装夹'))]}" -->
|
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'not in', ('pending_processing', 'pending_cam', 'pending_era_cam')), ('state','!=','ready'), ('routing_type', 'not in', ('装夹预调', 'CNC加工', '解除装夹'))]}" -->
|
||||||
@@ -154,7 +155,7 @@
|
|||||||
attrs="{'invisible': ['|','|',('routing_type','!=','装夹预调'),('is_delivery','=',True),('state','!=','done')]}"/>
|
attrs="{'invisible': ['|','|',('routing_type','!=','装夹预调'),('is_delivery','=',True),('state','!=','done')]}"/>
|
||||||
<button name="button_send_program_again" type="object" string="重新下发NC程序" class="btn-primary"
|
<button name="button_send_program_again" type="object" string="重新下发NC程序" class="btn-primary"
|
||||||
confirm="是否确认重新下发NC程序?"
|
confirm="是否确认重新下发NC程序?"
|
||||||
attrs="{'invisible': ['|', ('routing_type','!=','装夹预调'),('state','=','done')]}"/>
|
attrs="{'invisible': ['|', '|', '|',('routing_type','!=','装夹预调'),('state','not in',['ready','progress']),('processing_drawing','=',False),('is_send_program_again','=',True)]}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[1]" position="before">
|
<xpath expr="//page[1]" position="before">
|
||||||
<page string="开料要求" attrs='{"invisible": [("routing_type","!=","切割")]}'>
|
<page string="开料要求" attrs='{"invisible": [("routing_type","!=","切割")]}'>
|
||||||
@@ -296,7 +297,7 @@
|
|||||||
</group>
|
</group>
|
||||||
<group string="加工图纸">
|
<group string="加工图纸">
|
||||||
<!-- 隐藏加工图纸字段名 -->
|
<!-- 隐藏加工图纸字段名 -->
|
||||||
<field name="processing_drawing" widget="pdf_viewer" string=""/>
|
<field name="processing_drawing" widget="pdf_viewer" string="" readonly="1"/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
<page string="前置三元检测定位参数" attrs='{"invisible": [("routing_type","!=","装夹预调")]}'>
|
<page string="前置三元检测定位参数" attrs='{"invisible": [("routing_type","!=","装夹预调")]}'>
|
||||||
|
|||||||
Reference in New Issue
Block a user