跳至內容
選單
此問題已被標幟
2 回覆
879 瀏覽次數

Does anyone know how to remove the black horizontal line that appears before the footer content in all native Odoo 17 reports?

頭像
捨棄
最佳答案

Hello Enzo!

You will access:

Settings > General Settings > and click on "Edit Layout":


After that, it will comment on lines "50" and "61" or any 'div' that has style="border-top: 1px solid black;":



In the printing of the reports, you will see that the horizontal black line will no longer be present:



I hope I helped.

頭像
捨棄
最佳答案

To remove the black horizontal line that appears before the footer in all native Odoo 17 reports, you can modify the report templates. The line you're seeing is most likely part of the default report design, often defined within the QWeb template or the CSS used for rendering reports.

Here’s how you can remove it:

  1. Identify the Template:
    • Odoo reports are typically rendered using QWeb templates. You'll need to find the correct QWeb template for the report you're working with. The report templates are usually located in the report directory of your Odoo modules.
  2. Locate the Footer Section:
    • In the template, locate the section that deals with the footer. This might be defined within a <div class="footer"> or similar class.
  3. Remove or Modify the Border/CSS:
    • The black horizontal line is most likely a border or a background element defined in the CSS. Look for any CSS properties like border-top, border-bottom, or background-color in the footer section. You can either remove or override these styles.

For example, if the line is defined like this:

xml

CopyEdit

<style> .footer { border-top: 1px solid #000; } </style>

You can remove or modify it like this:

xml

CopyEdit

<style> .footer { border-top: none; /* Removes the black line */ } </style>

  1. Customize the Report Template:
    • You may need to create a custom module or modify an existing one to inherit and customize the template. To do this, you'll override the QWeb report template in your custom module and adjust the footer’s styling.
  2. Clear Cache and Update:
    • After making changes to the template, make sure to clear the cache and restart the Odoo service for the changes to take effect.

If you're unfamiliar with modifying the QWeb templates or CSS, you can share the specific report you're working on, and I can guide you further with more detailed instructions or code snippets.

4o mini

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
6月 25
4605
6
12月 23
20528
3
7月 22
21811
1
4月 25
1215
2
3月 25
1359