Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造功能优化

This commit is contained in:
mgw
2025-01-13 17:31:23 +08:00
3 changed files with 2 additions and 10 deletions

View File

@@ -62,7 +62,7 @@ patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
const dom1 = buttonsDom.children('.o_form_button_save')
const dom2 = buttonsDom.children('.o_form_button_cancel')
dom1.append('保存')
dom2.append('取消')
dom2.append('放弃保存')
}
} catch (e) {
console.log(e)

View File

@@ -443,10 +443,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,10 +456,6 @@ 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:

View File

@@ -29,7 +29,7 @@ class PurchaseOrder(models.Model):
# 如果你需要list形式的结果可以将set转换为list
account_moves = list(account_moves)
if account_moves:
raise UserError(_("请联系工厂生产经理对该采购单的账单进行取消"))
raise UserError(_("请联系工厂生产经理对该采购单的供应商账单进行取消"))
return super(PurchaseOrder, self).button_cancel()
def action_view_production(self):
origins = [order.name for order in self.picking_ids]