Skip to Content
Menu
This question has been flagged
4096 Views

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
Discard

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

Author

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

Related Posts Replies Views Activity
1
Apr 24
1473
0
Feb 24
218
5
Jan 24
4868
1
Dec 23
2743
0
Oct 23
336