跳至内容
菜单
此问题已终结
2 回复
1184 查看

In Odoo version 17, when using a currency different from the database currency to create an invoice (e.g., the base currency is MXN and an invoice is created in USD), the PDF document will include a table showing the amount in the base currency with the exchange rate of that day. This can cause confusion for both the issuer and the recipient of the invoice.

It is possible to hide this table by following these steps (the Studio application is required):

  1. Go to Accounting
  2. Open Studio
  3. Select the "Reports" button
  4. Select the "Invoices" report
  5. Enter the source editor

5.1 Inside the source editor, at the top, we will have the following information:


If in the white line (top left) we have: "report_invoice_document" It means we are in the base view of the report, so we will need to create an inherited view with the help of the Studio application to modify the report.

To create the inherited view:

5.2 Enter the PDF editor


5.3 Click where the "Invoice INV/2023/0001" field ends.

5.4 Add a space using the keyboard

5.5 Save 

5.5 If we re-enter the source editor, we should now have: "web_studio.report_editor_customization_full.view._account.report_invoice_document" This works with any customization made to the PDF using Studio, but it is recommended to do it this way to avoid modifications to the document structure.

Base view (report without modifications with Studio)

Inherited view (report with customization using Studio)


Once you have the inherited view:

6. In the source editor, click the “Format” button to view the code information in a more organized manner.



7. Search the code for the information we need to hide, which has the title: document_tax_totals_company_currency (approximately between lines 250 and 300, depending on previous customizations).


8. Add after to comment out the table so it won't be displayed in the PDF. As a good practice, it is suggested to include the name or ID of the person who made the change in the comment, along with a brief note about the action.



And that´s all! Now the table is hidden:


形象
丢弃
最佳答案

Me funciona para facturas que no están timbradas, cuando las timbro vuelve a aparecer la tabla, ¿se te ocurre por qué?

形象
丢弃
编写者

Tal vez lo estás haciendo sobre la vista general del PDF y no sobre la vista heredada que es la que se muestra cuando está timbrada la factura :D

最佳答案

100% Helpful

形象
丢弃
相关帖文 回复 查看 活动
1
5月 25
122
1
5月 25
11
4
4月 25
13110
1
4月 25
388
0
1月 25
834