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

How to add different taxes in the list of invoices?

By
Lechuky
on 2/17/14, 2:45 PM 1,645 views

I'm trying to add diferent tax column in the list of invoices so I edit the account.invoice.tree to add the tax_line like this

//this adds only the total, I want each tax separate and with sum. Is good enough for suppliers but not for clients. <field name="amount_tax" sum="Tax Amount" invisible="context.get('type') == 'out_invoice'"/>

//this is what I try but it shows only "2 lines" and nothing else. ¿How can I change that from each tax line? or only show first tax line? <field name="tax_line" invisible="context.get('type') == 'in_invoice'"> <field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)" invisible="context.get('name') == 'IVA 21%'" string="IVA 21%"/> </field>

I put the hole code here.

<tree colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'" string="Invoice"> <field name="partner_id" groups="base.group_user"/> <field name="date_invoice"/> <field name="number"/> <field name="reference" invisible="1"/> <field name="name" invisible="1"/> <field name="journal_id" invisible="1"/> <field name="period_id" invisible="1" groups="account.group_account_user"/> <field name="company_id" groups="base.group_multi_company" widget="selection"/> <field name="user_id"/> <field name="date_due"/> <field name="origin"/> <field name="currency_id" groups="base.group_multi_currency"/> <field name="residual" sum="Residual Amount"/> <field name="amount_untaxed" sum="Untaxed Amount"/>

//this adds only the total, I want each tax separate and with sum. Is good enough for suppliers but not for clients. <field name="amount_tax" sum="Tax Amount" invisible="context.get('type') == 'out_invoice'"/>

//this is what I try but it shows only "2 lines" and nothing else. ¿How can I change that from each tax line? or only show first tax line? <field name="tax_line" invisible="context.get('type') == 'in_invoice'"> <field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)" invisible="context.get('name') == 'IVA 21%'" string="IVA 21%"/> </field>

<field name="amount_total" sum="Total Amount"/> <field name="state"/> </tree>

EDIT:

I try to explain it better.

In Spain I have two diferents taxes for my customers invoices. One call IVA 21%, and another call IRPF 21%. You can have more taxes like IVA 10% but that's the basics. The first tax (IVA) is positve +0.21 but the IRPD is negative -0.21 so the amount of taxes is ussualy 0€ and with the code

<field name="amount_tax" sum="Tax Amount" invisible="context.get('type') == 'out_invoice'"/>

It show always a columm of 0€

If i try to put each Tax in a diferent column or only one with the next code

<field name="tax_line" invisible="context.get('type') == 'in_invoice'">

<field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)" invisible="context.get('name') == 'IVA 21%'" string="IVA 21%"/>

</field>

What I got is one column with header Tax Line and in the data says (2 records)

What I really want is this one column for IVA 21% and other for IRPF 21% with Sum

Can't post links so can't show image.

Thanks a lot for the help.

Greetings!

Sorry, but what is your problem?

klacus
on 2/18/14, 12:35 AM

Sorry for the bad explanation. I'm gone to edit the question and add image to explain it better. informatizarte.com/openerp/openerp1.png and informatizarte.com/openerp/openerp2.png

Lechuky
on 2/18/14, 4:50 AM

No one can help?

Lechuky
on 2/20/14, 12:39 PM

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

0 follower(s)

Stats

Asked: 2/17/14, 2:45 PM
Seen: 1645 times
Last updated: 3/16/15, 8:10 AM