I'm sorry for my English
I am writing a custom Qweb print report for Odoo invoices and my goal is add o.amount_untaxed + tax_amount_by_group(only positive values, excluding negative withholding); this is my code:
<t t-set="total" t-value="o.amount_untaxed"/> <t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group"> <small> <tr> <td> <span t-if="amount_by_group == 'Taxes'"> <span t-esc="amount_by_group"/> </span> <br></br> <t t-set="total" t-value="unicode(o.amount_untaxed)+amount_by_group"/> <t t-esc="total"/> </td> </tr> </small> <br></br> </t>
But the result is (based on actual DB records):
Subtotal $ 4,644.95 Taxes $ 557.39 Taxes 4644.95$ 557.39 Witholding 4644.95$ -167.21 Witholding 4644.95$ -46.45
My expected result need be (based on actual DB records):
Subtotal $ 4,644.95 Taxes $ 557.39 Total $ 5202.34
Total is the result of untaxed_amount + taxes (excluding withholding); I really tried many ways and I can not find the right one!
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 9/6/16, 1:00 AM|
|Seen: 353 times|
|Last updated: 9/6/16, 2:30 AM|