From d64c8fa304279f52ae426bfa8f451617cba9aa06 Mon Sep 17 00:00:00 2001 From: Swapnesh Shah Date: Tue, 5 May 2020 18:46:18 +0000 Subject: [PATCH] [FIX] website_sale: display validation properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, This validation message was not displayed properly. (See https://nimb.ws/OwfLsH ) Now we are displaying Validation error Properly. (See https://nimb.ws/ji3N2h ) closes odoo/odoo#50704 Signed-off-by: Jérémy Kersten (jke) --- addons/website_sale/models/product.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/website_sale/models/product.py b/addons/website_sale/models/product.py index ff61753a794..aaa235707a5 100644 --- a/addons/website_sale/models/product.py +++ b/addons/website_sale/models/product.py @@ -126,8 +126,7 @@ class ProductPricelist(models.Model): ''' for record in self.filtered(lambda pl: pl.website_id and pl.company_id): if record.website_id.company_id != record.company_id: - raise ValidationError(_("Only the company's websites are allowed. \ - Leave the Company field empty or select a website from that company.")) + raise ValidationError(_("""Only the company's websites are allowed.\nLeave the Company field empty or select a website from that company.""")) class ProductPublicCategory(models.Model):