From e6725adca98c2d7dfa700d3b6dcb5a900c1688ae Mon Sep 17 00:00:00 2001 From: "Benjamin Frantzen (bfr)" Date: Thu, 11 Jun 2020 09:58:02 +0000 Subject: [PATCH] [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 --- addons/purchase/i18n/purchase.pot | 7 +++++++ addons/purchase/models/purchase.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot index 386af71cb22..32ee4c3f3a0 100644 --- a/addons/purchase/i18n/purchase.pot +++ b/addons/purchase/i18n/purchase.pot @@ -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 "" diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index b0d8316f342..d2a43bea5bd 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -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: