[FIX] website_sale: display validation properly

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) <jke@openerp.com>
This commit is contained in:
Swapnesh Shah
2020-05-05 18:46:18 +00:00
committed by GitHub
parent 8f34b34abd
commit d64c8fa304
+1 -2
View File
@@ -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):