修改报错翻译
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Translation of Odoo Server.
|
# Translation of Odoo Server.
|
||||||
# This file contains the translation of the following modules:
|
# This file contains the translation of the following modules:
|
||||||
# * purchase_request
|
# * jikimo_purchase_request
|
||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
# Jeffery Chen Fan <jeffery9@gmail.com>, 2016
|
# Jeffery Chen Fan <jeffery9@gmail.com>, 2016
|
||||||
@@ -862,7 +862,7 @@ msgstr "采购申请 %s 已完成"
|
|||||||
#: code:addons/purchase_request/wizard/purchase_request_line_make_purchase_order.py:0
|
#: code:addons/purchase_request/wizard/purchase_request_line_make_purchase_order.py:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Purchase Request %s is not approved or in progress"
|
msgid "Purchase Request %s is not approved or in progress"
|
||||||
msgstr "采购申请 %s 未获批准或在进行中"
|
msgstr "采购申请 %s 状态非已批准或进行中"
|
||||||
|
|
||||||
#. module: purchase_request
|
#. module: purchase_request
|
||||||
#: model:ir.model,name:purchase_request.model_purchase_request_allocation
|
#: model:ir.model,name:purchase_request.model_purchase_request_allocation
|
||||||
|
|||||||
@@ -86,7 +86,15 @@ class PurchaseRequestLineMakePurchaseOrder(models.TransientModel):
|
|||||||
"context": False,
|
"context": False,
|
||||||
"type": "ir.actions.act_window",
|
"type": "ir.actions.act_window",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def _check_valid_request_line(self, request_line_ids):
|
||||||
|
for line in self.env["purchase.request.line"].browse(request_line_ids):
|
||||||
|
if line.request_id.state not in ["approved", "in_progress"]:
|
||||||
|
raise UserError(
|
||||||
|
_("采购申请 %s 未审批或未进行中")
|
||||||
|
% line.request_id.name
|
||||||
|
)
|
||||||
|
super(PurchaseRequestLineMakePurchaseOrder, self)._check_valid_request_line(request_line_ids)
|
||||||
|
|
||||||
class PurchaseRequestLineMakePurchaseOrderItem(models.TransientModel):
|
class PurchaseRequestLineMakePurchaseOrderItem(models.TransientModel):
|
||||||
_inherit = "purchase.request.line.make.purchase.order.item"
|
_inherit = "purchase.request.line.make.purchase.order.item"
|
||||||
|
|||||||
Reference in New Issue
Block a user