Siirry sisältöön
Odoo Menu
  • Kirjaudu sisään
  • Kokeile ilmaiseksi
  • Sovellukset
    Talous
    • Kirjanpito
    • Laskutus
    • Kulut
    • Datataulukot (BI)
    • Asiakirjat
    • Allekirjoita
    Myynti
    • CRM
    • Myynti
    • Kassajärjestelmä myymälään
    • Kassajärjestelmä ravintolaan
    • Tilaukset
    • Vuokraus
    Verkkosivut
    • Verkkosivun Rakennustyökalu
    • Verkkokauppa
    • Blogi
    • Foorumi
    • Livechat
    • Verkko-oppiminen
    Toimitusketju
    • Varastointi
    • Tuotanto
    • Tuotteen elinkaaren hallinta (PLM)
    • Ostot
    • Huolto
    • Laatu
    Henkilöstöhallinto
    • Työntekijät
    • Rekrytointi
    • Vapaat
    • Arvioinnit
    • Suositukset
    • Kuljetuskalusto
    Markkinointi
    • Somemarkkinointi
    • Sähköpostimarkkinointi
    • Tekstiviestimarkkinointi
    • Tapahtumat
    • Markkinoinnin automaatio
    • Kyselyt
    Palvelut
    • Projekti
    • Työaikakirjaukset
    • Kenttähuolto
    • Asiakaspalvelu
    • Suunnittelu
    • Ajanvaraukset
    Tuottavuus
    • Viestintä
    • Hyväksynnät
    • IoT
    • IP-puhe
    • Tietokirjasto
    • WhatsApp
    Kolmannen osapuolen sovellukset Odoo-Studio Odoo-Pilvialusta
  • Toimialat
    Vähittäiskauppa
    • Kirjakauppa
    • Vaatekauppa
    • Huonekaluliike
    • Ruokakauppa
    • Laitteistokauppa
    • Lelukauppa
    Ruoka & Majoitus
    • Baari ja Pubi
    • Ravintola
    • Pikaruoka
    • Majatalo
    • Juomien jakelija
    • Hotelli
    Kiinteistöt
    • Kiinteistönvälitystoimisto
    • Arkkitehtitoimisto
    • Rakentaminen
    • Kiinteistönhallinta
    • Puutarhanhoito
    • Kiinteistön omistajien yhdistys
    Konsultointi
    • Tilitoimisto
    • Odoo-kumppani
    • Markkinointitoimisto
    • Lakitoimisto
    • Osaajahankinta
    • Tilintarkastus & sertifiointi
    Tuotanto
    • Tekstiili
    • Metalli
    • Huonekalut
    • Ruoka
    • Panimo
    • Yrityslahjat
    Terveys & Liikunta
    • Urheiluseura
    • Silmälasiliike
    • Kuntokeskus
    • Hyvinvointialan ammattilaiset
    • Apteekki
    • Kampaamo
    Kaupat
    • Yleismies
    • IT-laitteisto & Tuki
    • Aurinkoenergiajärjestelmät
    • Suutari
    • Siivoustarvikkeet
    • LVI-palvelut
    Muut
    • Voittoa tavoittelematon järjestö
    • Ympäristötoimisto
    • Mainostaulujen vuokraus  
    • Valokuvaus
    • Leasing-pyörät
    • Ohjelmistojen jälleenmyyjä
    Selaa kaikkia toimialoja
  • Yhteisö
    Opi
    • Tutoriaalit
    • Dokumentaatio
    • Todistukset
    • Koulutus
    • Blogi
    • Podcast
    Kannusta kouluttautumaan
    • Koulutusohjelmat
    • Scale Up! Liiketoimintapeli
    • Vieraile Odoolla
    Hanki ohjelmisto
    • Lataa
    • Vertaile versioita
    • Julkaisut
    Tee yhteistyötä
    • Github
    • Foorumi
    • Tapahtumat
    • Käännökset
    • Ryhdy kumppaniksi
    • Kumppanipalvelut
    • Rekisteröi tilitoimistosi
    Hanki palveluja
    • Löydä kumppani
    • Löydä kirjanpitäjä
    • Varaa asiantuntijatapaaminen
    • Implementaatiopalvelut
    • Asiakasreferenssit
    • Tuki
    • Versionkorotukset
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Varaa demo
  • Hinnoittelu
  • Asiakaspalvelu

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Kirjanpito
  • Varastointi
  • PoS
  • Projekti
  • MRP
All apps
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Apua

There is an issue with the Odoo 16 PDF report where the content of a table row is moving to the next page.

Tilaa

Saat ilmoituksen, kun tähän viestiin ilmaantuu aktiviteettia

Tämä kysymys on merkitty
qwebpdfreportodoov16
1 Vastaa
2664 Näkymät
Avatar
Mathesh

In Odoo 16, inside a table, if the content of a row is too long and doesn't fit on the first page, the entire row moves to the next page. However, when the content is too long for the second page as well, the row gets split, with part of the content appearing on the first page and the rest on the second page. I want it to behave differently: if the content doesn't fit on the first page, it should be split at that point, rather than moving the entire row to the next page. as mentioned below.


  1. doesn't fit to the first page:

  2. when doesn't fit to the second page also:


Thanks,

0
Avatar
Hylkää
Avatar
Dmitriy Stepanov
Paras vastaus

Hello,

The issue where table rows in Odoo PDF reports split or move to the next page is commonly related to the limitations of the PDF rendering library used in Odoo, typically wkhtmltopdf. To resolve this issue in Odoo 16 where rows in a table get split across pages, you will need to modify the way Odoo handles table row breaks when generating reports. By default, Odoo handles row content in a way that tries to keep the row together, but in cases where the content is too long, it can split the row. You can adjust the behavior by modifying the report template or the QWeb report styles.

Here's how you can address this issue:

1. Override the QWeb Template:

You will need to update the report template for your specific report, particularly if you are dealing with tables inside a report like invoices, sales orders, or custom reports.

Find the QWeb template associated with the report (usually in views/report_*).

If the issue is with a table row not splitting, add a page-break-inside: auto; CSS property to the row (<tr>) or a surrounding block element.

2. Modify the CSS for the Table Rows:

Modify the CSS to prevent the table row from staying together. You can use the page-break-inside CSS property. By default, Odoo might have this set to avoid, which means the row tries to avoid splitting and moves to the next page entirely if it doesn't fit. You will want to change this to auto so that the row can be split.

Here's an example of how to modify the page-break-inside CSS for the row:

table {

width: 100%;

border-collapse: collapse;

}

tr {

page-break-inside: auto; /* Allows row content to be split across pages */

}

td, th {

padding: 5px;

border: 1px solid #ddd;

}

This CSS will ensure that the row can be split if the content is too large to fit on the page.

3. Add a page-break-after or page-break-before for Specific Rows:

If you want to have more control over when a row is forced onto a new page (for example, for very long content), you can use page-break-after or page-break-before properties on specific rows.

Example:

.long-content-row {

page-break-after: always; /* Forces the row to start on the next page */

}

Apply this class to the specific row that needs to break and be on the next page.

4. Update the Report's style Block:

If the report's template does not have a CSS style block, you can add one to the QWeb report definition. If you're using a custom report, you can include the style block in your template:

<t t-name="your_module.report_template">

<style>

tr {

page-break-inside: auto; /* Allows row splitting */

}

.long-content-row {

page-break-after: always; /* Force next row to be on the next page */

}

</style>

<table>

<tr>

<td>Content</td>

</tr>

</table>

</t>

5. Test and Refine the Output:

After modifying the CSS and template, generate a report and test the layout. You should see that if the content is too long to fit on the first page, it will now split at the point where necessary, instead of moving the entire row to the next page. If there are any issues with content overlapping or not being split as expected, you may need to adjust the styles further.

Another approach:

1. Optimize wkhtmltopdf Settings

If you have control over wkhtmltopdf options, try enabling --disable-smart-shrinking or modifying other parameters to improve rendering.

Update the report.paperformat in Odoo to include these options:

Navigate to Settings > Technical > Reports > Paper Formats.

In the "Custom Paper Format" options, add or modify the "Custom Options" field with:

--disable-smart-shrinking

2. Consider Upgrading wkhtmltopdf

Ensure that you are using a stable and updated version of wkhtmltopdf. Some older versions have rendering issues with complex table layouts.

Recommended version: 0.12.6 or higher (as of recent stable releases).

0
Avatar
Hylkää
Nautitko keskustelusta? Älä vain lue, vaan osallistu!

Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!

Rekisteröidy
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
Avoid Page break inside table due to long content
qweb pagebreak long-content pdfreport
Avatar
0
syysk. 25
3817
Generate Delivery Report Separately One Click from Sale Order
qweb qweb-report PDF pdfreport
Avatar
Avatar
1
helmik. 22
2934
Odoo 18: Display image from char field containing url in qweb form
qweb
Avatar
Avatar
1
heinäk. 25
2920
PDF Export Option for QWeb Reports in odoo 17.0
qweb
Avatar
Avatar
1
toukok. 25
3635
QWeb: use t-if to check birthday date Ratkaistu
qweb
Avatar
Avatar
1
huhtik. 25
3180
Yhteisö
  • Tutoriaalit
  • Dokumentaatio
  • Foorumi
Avoin lähdekoodi
  • Lataa
  • Github
  • Runbot
  • Käännökset
Palvelut
  • Odoo.sh hosting
  • Tuki
  • Versionkorotus
  • Räätälöidyt kehitykset
  • Koulutus
  • Löydä kirjanpitäjä
  • Löydä kumppani
  • Ryhdy kumppaniksi
Meistä
  • Yrityksemme
  • Tavaramerkki
  • Ota yhteyttä
  • Työpaikat
  • Tapahtumat
  • Podcast
  • Blogi
  • Asiakkaat
  • Oikeudellinen ilmoitus • Yksityisyys
  • Tietoturva
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo on kokoelma avoimen lähdekoodin yrityssovelluksia, jotka kattavat kaikki yrityksesi tarpeet: asiakkuudenhallinta eli CRM, verkkokauppa, kirjanpito, varastointi, kassajärjestelmä, projektinhallinta, jne.

Odoon uniikki arvolupaus on olla samanaikaisesti erittäin helppokäyttöinen ja täysin integroitu.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now