diff --git a/brand_external_report_layout/models/res_brand.py b/brand_external_report_layout/models/res_brand.py index 1f777f864..61c5c27b6 100644 --- a/brand_external_report_layout/models/res_brand.py +++ b/brand_external_report_layout/models/res_brand.py @@ -5,7 +5,6 @@ import os from odoo import _, api, fields, models, tools -from odoo.tools import html2plaintext class ResBrand(models.Model): @@ -69,7 +68,7 @@ def _get_default_brand_logo(self): string="Brand Details", help="Header text displayed at the top of all reports.", ) - is_company_details_empty = fields.Boolean(compute='_compute_empty_company_details') + is_company_details_empty = fields.Boolean(compute="_compute_empty_company_details") layout_background = fields.Selection( [("Blank", "Blank"), ("Geometric", "Geometric"), ("Custom", "Custom")], default="Blank", @@ -77,10 +76,12 @@ def _get_default_brand_logo(self): ) layout_background_image = fields.Binary("Background Image") - @api.depends('company_details') + @api.depends("company_details") def _compute_empty_company_details(self): for record in self: - record.is_company_details_empty = not html2plaintext(record.company_details or '') + record.is_company_details_empty = not tools.html2plaintext( + record.company_details or "" + ) def change_report_template(self): self.ensure_one()