Accept Merge Request #1029: (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/1029
This commit is contained in:
@@ -899,7 +899,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
for workorder in record.production_id.workorder_ids:
|
||||
if workorder.state != 'done':
|
||||
is_production_id = False
|
||||
if is_production_id == True and record.name == '解除装夹':
|
||||
if is_production_id is True and record.routing_type in ['解除装夹', '表面工艺']:
|
||||
for workorder in record.production_id.workorder_ids:
|
||||
workorder.rfid_code_old = workorder.rfid_code
|
||||
workorder.rfid_code = None
|
||||
|
||||
@@ -222,7 +222,7 @@ class QuickEasyOrder(models.Model):
|
||||
self_machining_id,
|
||||
item, order_id,
|
||||
'self_machining',
|
||||
i)
|
||||
i, False)
|
||||
# 创建坯料的bom
|
||||
self_machining_bom = self.env['mrp.bom'].bom_create(self_machining_embryo, 'normal', False)
|
||||
# 创建坯料里bom的组件
|
||||
@@ -237,7 +237,8 @@ class QuickEasyOrder(models.Model):
|
||||
# 创建坯料
|
||||
outsource_embryo = self.env['product.template'].sudo().no_bom_product_create(outsource_id, item,
|
||||
order_id,
|
||||
'subcontract', i)
|
||||
'subcontract', i,
|
||||
False)
|
||||
if outsource_embryo == -3:
|
||||
self.cr.rollback()
|
||||
return UserError(
|
||||
@@ -256,7 +257,8 @@ class QuickEasyOrder(models.Model):
|
||||
elif product.materials_type_id.gain_way == '采购':
|
||||
purchase_embryo = self.env['product.template'].sudo().no_bom_product_create(purchase_id, item,
|
||||
order_id,
|
||||
'purchase', i)
|
||||
'purchase', i,
|
||||
False)
|
||||
if purchase_embryo == -3:
|
||||
self.cr.rollback()
|
||||
return UserError(
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_confirm']" position="after">
|
||||
<field name="check_status" invisible="1"/>
|
||||
<field name="mrp_production_count" invisible="1"/>
|
||||
<button name="sf_sale.action_sale_order_check_wizard" string="审核" type="action"
|
||||
context="{'default_order_id':active_id}" groups="sf_base.group_sale_director"
|
||||
attrs="{'invisible': ['|',('check_status','in', ['approved',False,'fail']),('state', 'in', ['cancel'])]}"
|
||||
@@ -82,7 +81,10 @@
|
||||
<!-- </attribute>-->
|
||||
<!-- </xpath>-->
|
||||
<xpath expr="//form/header/button[@name='action_confirm'][2]" position="replace">
|
||||
<field name="mrp_production_count" invisible="1"
|
||||
groups="sf_base.group_sale_salemanager,sf_base.group_sale_director"/>
|
||||
<button name="action_confirm" data-hotkey="v"
|
||||
groups="sf_base.group_sale_salemanager,sf_base.group_sale_director"
|
||||
string="确认" type="object" context="{'validate_analytic': True}"
|
||||
attrs="{'invisible': ['|','&',('check_status', '!=', 'approved'),('state', 'in', ['draft','cancel']),'&','&',('check_status', '=', 'approved'),('state', 'in', ['sale','cancel']),('mrp_production_count', '!=', 0)]}"/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user