跳至内容
菜单
此问题已终结
2 回复
3391 查看

Hello everybody,

I'am on odoo 10, and I'd like to display 2 headers on my custom report.

One for the first page and the second for the following pages.

Can tell me how to do it?

Thank you.

Best regards

形象
丢弃
最佳答案

Check this module which does exactly what you want: https://apps.odoo.com/apps/modules/10.0/report_qweb_element_page_visibility/     

You can use a negative margin-top style in order to place the second-page header on the same vertical position as the first-page header, see the example below:

            <div class="first-page">
                <span t-field="company.header_first_image" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;padding-small&quot;}"/>
            </div>
            <div class="row col-xs-9 pull-right not-first-page"  style="margin-top:-79px;">
                <span t-field="company.header_not_first_image" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;padding-small&quot;}"/>
            </div>
形象
丢弃
编写者

Thank you.

I've already tried. in second page is just hide the first header and add the second header after the first one. so i have a lot of blank spaces.

Use a negative margin-top style and you are fine (see my amended example).

@Hilar thanks! I've spent half of a day and about 200 pages of paper until I had fine-tuned my letterheads ;-)