From 50574a9770dff7a7245d0dcdc2f1b09cbc5ff651 Mon Sep 17 00:00:00 2001 From: Manisha Tulsiyani Date: Mon, 9 May 2022 13:24:23 +0000 Subject: [PATCH] [FIX] website_sale_slides: fix name of products of the type 'course' in SOL Currently, the name of products of the type 'course' in SOL was missing due to the split by '\n' in name_get. So this commit fixes this issue and remove the \n if there is only one payment channel for course. task-2823432 closes odoo/odoo#93836 X-original-commit: 289c3219b7975ebee8748223a136e1d752da440f Related: odoo/enterprise#28499 Signed-off-by: Laurent Stukkens (ltu) --- addons/website_sale_slides/models/product_product.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_sale_slides/models/product_product.py b/addons/website_sale_slides/models/product_product.py index 7d3cacf6d35..fd0a638189c 100644 --- a/addons/website_sale_slides/models/product_product.py +++ b/addons/website_sale_slides/models/product_product.py @@ -15,4 +15,5 @@ class Product(models.Model): if not payment_channels: return super(Product, self).get_product_multiline_description_sale() - return _('Access to:\n%s', '\n'.join(payment_channels.mapped('name'))) + new_line = '' if len(payment_channels) == 1 else '\n' + return _('Access to:%s%s', new_line, '\n'.join(payment_channels.mapped('name')))