Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3383 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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>
Ảnh đại diện
Huỷ bỏ
Tác giả

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 ;-)