[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) <ltu@odoo.com>
This commit is contained in:
Manisha Tulsiyani
2022-06-16 20:30:04 +02:00
committed by Barad Mahendra
parent d300a0a021
commit 50574a9770
@@ -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')))