콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
9403 화면

Hi,


The company have specific graphical charter, for the letterheads an so on.

Reproducing it with QWeb, and inheritance would be very complex.


I thought I might go with the correct template as an image (having logo, adress, ... with correct fonts, size, ...) as picture, and use background feature.


Unfortunately, the background is only in the body of the reports. headers and footers are not considered.

Still, I think I could make some inheritance to have it whole page. But doesn't seem to work.

There's always this space for headers and footer, even when I do a "position=replace" of that div.

Any directions?

아바타
취소
작성자

For the record, this is an SaaS instance, so I'm creating a view that inherits from standard views.

베스트 답변

To use an image as the background for the entire page of a report in Odoo, you can try the following approach:

  1. Create a new QWeb report using the "Add a custom report" option in the Developer mode.

  2. In the report template, add a

    element with the desired image as the background. Set the position style to absolute and the z-index style to -1, so that the content of the report is displayed on top of the background image.
    Copy code
    position: absolute; z-index: -1;"> src="/path/to/image.jpg" style="width: 100%; height: 100%;"/>
    1. To make the background image fill the entire page, including the header and footer, you can set the height style of the
      element to 100% and the width style to 100%.
      Copy code
      position: absolute; z-index: -1; height: 100%; width: 100%;"> src="/path/to/image.jpg" style="width: 100%; height: 100%;"/>
      1. If you want to use an image as the background for only a specific report, you can create a new view that inherits from the standard report view, and add the
        element with the background image in the new view.
        Copy code
            
                .template_id">
                    [@class='page']" position="inside">
                        
        position: absolute; z-index: -1; height: 100%; width: 100%;"> src="/path/to/image.jpg" style="width: 100%; height: 100%;"/>

        I hope this helps. Let me know if you have any questions or if you need further assistance.


아바타
취소
베스트 답변

Hi,

How can I insert a background image into the structure of the xml document chosen as the basis for the various modules? For example, I would like to modify the structure of the "external_layout_boxed" xml document from "Settings", where can I intervene in the code to insert a full-page image? The page format of the document is A4.

Thank you!

아바타
취소
관련 게시물 답글 화면 활동
0
11월 23
3647
1
10월 22
6587
0
7월 22
9
0
10월 22
3546
1
8월 22
5040