Skip to content

Commit

Permalink
Merge PR #195 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by sbejaoui
  • Loading branch information
OCA-git-bot committed Jan 1, 2025
2 parents 1d68684 + 3b32646 commit 3bc461a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions brand_external_report_layout/models/res_brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,21 @@ 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")
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")
def _compute_empty_company_details(self):
for record in self:
record.is_company_details_empty = not tools.html2plaintext(
record.company_details or ""
)

def change_report_template(self):
self.ensure_one()
context = {"default_brand_id": self.id}
Expand Down

0 comments on commit 3bc461a

Please sign in to comment.