reporting-engine/report_layout_config/models/base_document_layout.py

27 lines
719 B
Python
Raw Permalink Normal View History

2024-10-01 05:53:56 +00:00
# Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from flectra import api, fields, models
class BaseDocumentLayout(models.TransientModel):
_inherit = "base.document.layout"
full_header_img = fields.Binary(
related="company_id.full_header_img",
readonly=False,
help="Replaces whole header with image",
)
full_footer_img = fields.Binary(
related="company_id.full_footer_img",
readonly=False,
help="Replaces whole footer, disables footer logo",
)
@api.depends(
"full_footer_img",
"full_header_img",
)
def _compute_preview(self):
return super()._compute_preview()