diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml
index 83fafc29e1e..b3296670a76 100644
--- a/addons/account/views/account_move_views.xml
+++ b/addons/account/views/account_move_views.xml
@@ -1019,25 +1019,26 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/calendar/data/mail_template_data.xml b/addons/calendar/data/mail_template_data.xml
index 452962d3c24..8d6157c6b6e 100644
--- a/addons/calendar/data/mail_template_data.xml
+++ b/addons/calendar/data/mail_template_data.xml
@@ -108,11 +108,11 @@
% if object.event_id.videocall_location:
Join Video Call: ${object.event_id.videocall_location}
% endif
+ % if not is_html_empty(object.event_id.description):
+ Description of the event:
+ ${object.event_id.description | safe}
+ % endif
- % if not is_html_empty(object.event_id.description):
- Description of the event
- ${object.event_id.description | safe}
- % endif
@@ -230,11 +230,11 @@
% if object.event_id.videocall_location:
Join Video Call: ${object.event_id.videocall_location}
% endif
+ % if not is_html_empty(object.event_id.description):
+ Description of the event:
+ ${object.event_id.description | safe}
+ % endif
- % if not is_html_empty(object.event_id.description):
- Description of the event
- ${object.event_id.description | safe}
- % endif
@@ -332,11 +332,11 @@
% if object.event_id.videocall_location:
Join Video Call: ${object.event_id.videocall_location}
% endif
+ % if not is_html_empty(object.event_id.description):
+ Description of the event:
+ ${object.event_id.description | safe}
+ % endif
- % if not is_html_empty(object.event_id.description):
- Description of the event
- ${object.event_id.description | safe}
- % endif
diff --git a/addons/repair/models/repair.py b/addons/repair/models/repair.py
index 25443b46ce8..62b798c0081 100644
--- a/addons/repair/models/repair.py
+++ b/addons/repair/models/repair.py
@@ -3,9 +3,11 @@
from collections import defaultdict
from random import randint
+from markupsafe import Markup
+
from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
-from odoo.tools import float_compare
+from odoo.tools import float_compare, is_html_empty
class StockMove(models.Model):
@@ -344,7 +346,7 @@ class Repair(models.Model):
'partner_id': partner_invoice.id,
'partner_shipping_id': repair.address_id.id,
'currency_id': currency.id,
- 'narration': narration,
+ 'narration': narration if not is_html_empty(narration) else '',
'invoice_origin': repair.name,
'repair_ids': [(4, repair.id)],
'invoice_line_ids': [],
@@ -358,10 +360,11 @@ class Repair(models.Model):
invoice_vals = current_invoices_list[0]
invoice_vals['invoice_origin'] += ', ' + repair.name
invoice_vals['repair_ids'].append((4, repair.id))
- if not invoice_vals['narration']:
- invoice_vals['narration'] = narration
- else:
- invoice_vals['narration'] += '
' + narration
+ if not is_html_empty(narration):
+ if is_html_empty(invoice_vals['narration']):
+ invoice_vals['narration'] = narration
+ else:
+ invoice_vals['narration'] += Markup('
') + narration
# Create invoice lines from operations.
for operation in repair.operations.filtered(lambda op: op.type == 'add'):
diff --git a/odoo/addons/base/views/res_partner_views.xml b/odoo/addons/base/views/res_partner_views.xml
index d793383daa7..9c69312c26b 100644
--- a/odoo/addons/base/views/res_partner_views.xml
+++ b/odoo/addons/base/views/res_partner_views.xml
@@ -318,7 +318,6 @@
-
@@ -327,13 +326,16 @@
-
+
+
+
+