Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
5011 Ansichten

Currently i have 2 diferent taxes (But they could be more),  Tax 1 will be used by every customer but tax 2 will be applicable just in some of them, so i want to Split both taxes, if the customer has both taxes then both taxes will be displayed , but if the customer just has Tax 1 then tax 2 won't be showed.


This is my code

<td>
<t t-foreach="o.amount_by_group" t-as="amount">
<span t-esc="amount[3]"/>
</t>
</td>

This code make a loop showing all the taxes 

Like this : 

tax 1 = $10  tax 2= $15 tax 3 = $20 tax 4= $25

Let's say that i have 4 Taxes but i need to print just Tax 1 and Tax 2 in my Invoice Template.

Example: 

Total_Untaxed = $100

 Tax 1= $10

 Tax 2= $5   

 Total = $115 


How to print specific Taxes without using a loop (foreach)?
   

Avatar
Verwerfen

Why don't you simply use Odoo's default tax functionality, which can handle multiple taxes?

Autor

yeah but i need to split taxes because in my custom report i have to show the total amount of each of them in different places.

Odoo gives you this field "amount_tax" but that's the total amount of all my taxes, and i need only the amount of a specific tax for my custom report.

Hello Kevin did you solve this ?
i wanna the same as you shared

Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Juni 25
1008
2
Jan. 25
6794
1
Apr. 24
2783
0
Feb. 24
1381
5
Jan. 24
7083