mirror of
https://gitlab.com/flectra-community/reporting-engine.git
synced 2024-12-23 21:01:49 +00:00
27 lines
719 B
Python
27 lines
719 B
Python
|
# 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()
|