Skip to content

Commit

Permalink
[IMP] formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiFr82 authored Apr 2, 2024
1 parent 6ab3796 commit 3b32646
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions brand_external_report_layout/models/res_brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import os

from odoo import _, api, fields, models, tools
from odoo.tools import html2plaintext


class ResBrand(models.Model):
Expand Down Expand Up @@ -69,18 +68,20 @@ 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",
required=True,
)
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(

Check warning on line 82 in brand_external_report_layout/models/res_brand.py

View check run for this annotation

Codecov / codecov/patch

brand_external_report_layout/models/res_brand.py#L82

Added line #L82 was not covered by tests
record.company_details or ""
)

def change_report_template(self):
self.ensure_one()
Expand Down

0 comments on commit 3b32646

Please sign in to comment.