mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[14.0][IMP] add layout for clean template
This commit is contained in:
@@ -8,22 +8,16 @@ class BaseDocumentLayout(models.TransientModel):
|
||||
_inherit = "base.document.layout"
|
||||
|
||||
full_header_img = fields.Binary(
|
||||
related="company_id.full_header_img", readonly=False
|
||||
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
|
||||
related="company_id.full_footer_img",
|
||||
readonly=False,
|
||||
help="Replaces whole footer, disables footer logo",
|
||||
)
|
||||
|
||||
need_images_layout = fields.Boolean(
|
||||
compute="_compute_need_images_layout", readonly=True
|
||||
)
|
||||
|
||||
@api.depends("report_layout_id")
|
||||
def _compute_need_images_layout(self):
|
||||
self.ensure_one()
|
||||
img_lay = self.env.ref("report_layout_config.external_layout_images").view_id
|
||||
self.need_images_layout = self.external_report_layout_id == img_lay
|
||||
|
||||
@api.depends(
|
||||
"full_footer_img",
|
||||
"full_header_img",
|
||||
|
||||
Reference in New Issue
Block a user