Accept Merge Request #1739: (feature/customer_supply -> develop)
Merge Request: 工艺确认后的错误提示 Created By: @廖丹龙 Accepted By: @秦圣 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1739
This commit is contained in:
@@ -432,7 +432,6 @@ class MrpProduction(models.Model):
|
||||
# 工艺确认
|
||||
def technology_confirm(self):
|
||||
process_parameters = []
|
||||
account_moves = []
|
||||
purchase_orders = []
|
||||
parameters_not = []
|
||||
# 获取原有的工单对应的工序
|
||||
@@ -443,10 +442,6 @@ class MrpProduction(models.Model):
|
||||
for deleted_design in deleted_designs:
|
||||
workorder = self.env['mrp.workorder'].search([('technology_design_id', '=', deleted_design.id)])
|
||||
purchase = workorder._get_surface_technics_purchase_ids()
|
||||
account = self.env['account.move'].search([('id', 'in', purchase.invoice_ids.ids)])
|
||||
if account.state not in ['cancel', False]:
|
||||
if account.name not in account_moves:
|
||||
account_moves.append(account.name)
|
||||
if purchase.state not in ['cancel','draft', False]:
|
||||
purchase_orders.append(purchase.name)
|
||||
special_design = self.technology_design_ids.filtered(
|
||||
@@ -460,9 +455,7 @@ class MrpProduction(models.Model):
|
||||
if not product_production_process:
|
||||
if special.process_parameters_id not in process_parameters:
|
||||
process_parameters.append(special.process_parameters_id.display_name)
|
||||
|
||||
if account_moves:
|
||||
raise UserError(_("请联系工厂生产经理对该(%s)账单进行取消", ", ".join(account_moves)))
|
||||
|
||||
if purchase_orders:
|
||||
raise UserError(_("请联系工厂生产经理对该(%s)采购订单进行取消", ", ".join(purchase_orders)))
|
||||
if parameters_not:
|
||||
|
||||
Reference in New Issue
Block a user