Odoo Help


When printing Invoices wrong table of taxes is printed.

Anabela Damas
on 9/4/13, 3:43 PM 2,526 views


I've done one invoice with several products and different taxes. When printing the invoice I was expecting to see a table with all taxes that I used and the value to witch tax, But I've this: image description So, in the table just appear the IVA23 and the other taxes are ignored.

I open the report with OpenOffice and I saw the cicle for the table of taxes but in the pdf just appear one.

In report:

Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]

[[ repeatIn(o.tax_line,'t') ]]
[[ t.name ]] 
[[ formatLang(t.base, digits=get_digits(dp='Account'))   ]] [[ o.currency_id.symbol ]]
[[  (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'))   ]] [[ o.currency_id.symbol ]]


I have the same problem, did you find any solution?

on 3/6/14, 5:14 AM

Anabela Damas

--Anabela Damas--

| 6 7 7
Aveiro, Portugal
--Anabela Damas--
IT Consultant
Anabela Damas
On 3/6/14, 5:29 AM


I solve this a long time ago, and I forget to put the solution here. I look for the code that fixes the bug and by the comments, I think is this:

class account_invoice(osv.osv):
    _inherit = "account.invoice"    

   def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj):
        if not inv.tax_line:
            for tax in compute_taxes.values():
                ait_obj.create(cr, uid, tax)
            tax_key = []
            for tax in inv.tax_line:
                if tax.manual:
                #key = (tax.tax_code_id.id, tax.base_code_id.id, tax.account_id.id, tax.account_analytic_id.id)
                key = (tax.name, tax.vi_tax_id.id, tax.tax_code_id.id, tax.base_code_id.id, tax.account_id.id, tax.account_analytic_id.id)
                if not key in compute_taxes:
                    raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
                base = compute_taxes[key]['base']
                if abs(base - tax.base) > inv.company_id.currency_id.rounding:
                    raise osv.except_osv(_('Warning!'), _('Tax base different!\nClick on compute to update the tax base.'))
            for key in compute_taxes:
                if not key in tax_key:
                    raise osv.except_osv(_('Warning!'), _('Taxes are missing!\nClick on compute button.'))

I think that is just this. Good luck. =)

I've update the code put nothing happend. The RML file need to be modified in someway too? Stop-Start server and compile the file too.

on 10/29/14, 11:28 PM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/4/13, 3:43 PM
Seen: 2526 times
Last updated: 3/16/15, 8:10 AM