Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4563 มุมมอง

Hello all,

I need your help please in Qweb report, I have two issues I don't know how to fix them:

- first issue is with header, I want to display header only in first page not all pages.

- second issue with formatting fileds (html fields), when I put images in form view it doesn't display well in the report, I got a lot of spaces between fields and the images mix with the text.

Examples:

form view

   

report view:

                             

python code:

    constClient  = fields.Html(string="Constation client")

    constGerant  = fields.Html(string="Constation gérant")


qweb code:

            <div t-if="doc.getconstClient">

                <strong>Constatation client: </strong>

                <span t-raw="doc.getconstClient"/>

            </div>

            <div t-if="doc.getconstGerant">

                <strong>Constatation gérant: </strong>

                <span t-raw="doc.getconstGerant"/>

            </div>


Thanks in advance

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Jean44

use below code before <div class="page">  in report,

<div class="header">
            Here is Header
  </div>

if you want to reuse it you can define with the separate template.

Thank You.


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 25
1673
1
พ.ค. 25
1669
QWeb: use t-if to check birthday date แก้ไขแล้ว
1
เม.ย. 25
2261
1
ก.พ. 25
1549
0
ต.ค. 24
1304