Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Use tax's 'description' instead of tax's 'name' in template invoice

By
E.M.
on 9/18/15, 6:55 PM 541 views

Hi, I would like to know how could I use tax's 'description' instead of tax's 'name' in below extract of code (invoice template).

Reason is that Spanish accounting module swaps (for some odd reason) name and description for taxes .

So Instead of:  

t-field="t.name"  

I would like to find how to do:

t-field="t.description"

But description is not a field of tax_line.

I guess I have to search t.name into another model to get tax description. Any help on how to do it is really welcomed.

<tr t-foreach="o.tax_line" t-as="t">
<td>
<span t-field="t.name"/>
</td>
<td class="text-right">
<span t-field="t.base" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td>
<td class="text-right">
<span t-field="t.amount" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td>
</tr>



Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/18/15, 6:55 PM
Seen: 541 times
Last updated: 9/18/15, 6:55 PM