Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/commercially_launched

This commit is contained in:
mgw
2025-03-18 09:45:00 +08:00
2 changed files with 8 additions and 8 deletions

View File

@@ -75,6 +75,12 @@ class SFSaleOrderCancelWizard(models.TransientModel):
# 取消销售订单
result = self.order_id.action_cancel()
# 取消制造订单的排程单
mo_plan_orders = self.env['sf.production.plan'].search([
('origin', '=', self.order_id.name)])
if mo_plan_orders:
mo_plan_orders.write({'state': 'cancel'})
# 取消关联的制造订单及其采购单
manufacturing_orders = self.env['mrp.production'].search([
('origin', '=', self.order_id.name)
@@ -94,12 +100,6 @@ class SFSaleOrderCancelWizard(models.TransientModel):
if mo_quality_checks:
mo_quality_checks.write({'quality_state': 'cancel'})
# 取消制造订单的排程单
mo_plan_orders = self.env['sf.production.plan'].search([
('origin', '=', order.name)])
if mo_plan_orders:
mo_plan_orders.write({'state': 'cancel'})
# 取消制造订单的子制造订单
child_mo_ids = self.env['mrp.production'].search([
('origin', '=', mo.name)

View File

@@ -54,7 +54,7 @@
</page>
</xpath>
<xpath expr="//header//button[@name='do_pass'][1]" position="attributes">
<attribute name="attrs">{'invisible': [('is_out_check', '=', True)]}</attribute>
<attribute name="attrs">{'invisible': ['|', ('is_out_check', '=', True), ('quality_state', '!=', 'none')]}</attribute>
<attribute name="string">合格</attribute>
</xpath>
<xpath expr="//header//button[@name='do_pass'][2]" position="attributes">
@@ -62,7 +62,7 @@
<attribute name="string">合格</attribute>
</xpath>
<xpath expr="//header//button[@name='do_fail'][1]" position="attributes">
<attribute name="attrs">{'invisible': [('is_out_check', '=', True)]}</attribute>
<attribute name="attrs">{'invisible': ['|', ('is_out_check', '=', True), ('quality_state', '!=', 'none')]}</attribute>
<attribute name="string">不合格</attribute>
</xpath>
<xpath expr="//header//button[@name='do_fail'][2]" position="attributes">