Skip to content
Snippets Groups Projects
Commit ba980243 authored by Benjamin Frantzen (bfr)'s avatar Benjamin Frantzen (bfr)
Browse files

[FIX] purchase: added missing i18n call for UserError


closes odoo/odoo#52850

Related: odoo/enterprise#11098
Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
parent da5f4470
No related branches found
No related tags found
No related merge requests found
......@@ -2157,3 +2157,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 ""
......@@ -606,7 +606,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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment