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?
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
No one can help?