Hello,
I am trying to make a custom quotation layout. I would like this layout has no header but use the default footer of report.external_layout. Also, I want to style this footer.
So, in a file, I create a custom footer template which I call report.custom_external_layout and in which I add using xpath a style tag:
<template id="report.custom_quotation_footer" inherit_id="report.external_layout_footer"> <xpath expr="//div[@class='footer']" position="before">
<style>
//My style
</style>
</xpath>
</template>
Then, I make a new layout which inherits from report.external_layout and remove the header part:
<template id="report.custom_quotation" inherit_id="report.external_layout">
<xpath expr="//t[@t-call='report.external_layout_header']" position="replace">
</xpath>
</template>
Last, I want call my custom layout into the definition of my report,
<template id="sale.nice_quotation">
<t t-call="report.custom_quotation">
<t t-foreach="docs" t-as="o">
<div class="page quotation">
<style>
//My report style
</style>
Some HTML
</t>
</t>
</template>
But when I want to print, odoo says me :
WebTemplateNotFound: Template 'report.custom_quotation' not found.
Maybe someone could help cause I can't see what is wrong in my code.
Thanks.