[FIX] purchase: added missing i18n call for UserError

closes odoo/odoo#53239

X-original-commit: ba980243789a731ef547abd5b99d3509aa1931bf
Related: odoo/enterprise#11264
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This commit is contained in:
Benjamin Frantzen (bfr)
2020-06-18 11:27:16 +00:00
parent 0ee0cb57c2
commit e6725adca9
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -2398,3 +2398,10 @@ msgid ""
"Your quotation contains products from company %s whereas your quotation belongs to company %s. \n"
" Please change the company of your quotation or remove the products from other companies (%s)."
msgstr ""
#. module: purchase
#: code:addons/purchase/models/purchase.py:0
#, python-format
msgid "You cannot change the type of a purchase order line. Instead you should delete the current line and create a new line of the proper type."
msgstr ""
+1 -1
View File
@@ -902,7 +902,7 @@ class PurchaseOrderLine(models.Model):
def write(self, values):
if 'display_type' in values and self.filtered(lambda line: line.display_type != values.get('display_type')):
raise UserError("You cannot change the type of a purchase order line. Instead you should delete the current line and create a new line of the proper type.")
raise UserError(_("You cannot change the type of a purchase order line. Instead you should delete the current line and create a new line of the proper type."))
if 'product_qty' in values:
for line in self: