Skip to Content
Menu
This question has been flagged

The Tax column in the Documents/PDFs of orders and invoices is unnecessary in the majority of cases (with same rates the column generates misunderstandings as the charges appear in the sum)

How to create a rule to add this column only when there are different taxes in the order/invoice lines?

Avatar
Discard
Best Answer

Hi Ricardo Gross,

If you are using Odoo Enterprise Edition, you can modify your reports using Studio. First, enable Studio mode, then open the report menu and select the specific report you want to modify, such as the Sale Order or Invoice report. Once you've selected the report, click on the field you want to modify, such as the tax field. In the left sidebar under 'Field Properties,' you can add conditions for that field based on your requirements.

If you need to accomplish this through code customization, you can inherit the report template and add conditions. For example:

  • For the Sale Order report template: report_saleorder_document: Sale Order report template ID
  • For the Invoice report template: report_invoice_document: Invoice report template ID

Hope it helps

Avatar
Discard
Best Answer

Hello @Ricardo Gross



Hope you are doing well


For you to remove the tax column from the reports you could use studio to do so


First of all you need to go to sale order the click studio and then got to reports and select the quotation/order report to edit.


Then click on the tax column to remove it by removing the columns and text fields.



As shown in below screenshots :- 

You could also implement using code, you will need to inherit the reports and mafe the following changes.

Please find code in comment. 

Feel free to contact me if needed

Hope this will help you.

Thanks & Regards,
Email:  odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari

Avatar
Discard

Please find code here :-
Example for quotation/order report:

<template id="report_saleorder_document_inherit" inherit_id="sale.report_saleorder_document">
<xpath expr="//th[@name='th_taxes']" position="attributes">
<attribute name="class" add="d-none" separator=" "/>
</xpath>
<xpath expr="//td[@name='td_taxes']" position="attributes">
<attribute name="class" add="d-none" separator=" "/>
</xpath>
</template>

Similar you need to do for invoice report.

Best Answer

abre el reporte desde Odoo Studio, luego ve al campo que quiere crear la regla, en el menu de la izquierda de Odoo Studio seleccion, Opcionies avanzadas (opciones avanzadas del campo seleccionado) alli podras insertar el códi python para que sea o no visible 

Avatar
Discard
Related Posts Replies Views Activity
5
Feb 24
3355
1
Jul 25
504
0
Jun 25
452
1
Jun 25
843
2
Jul 25
1429