One person in other forum ask me if the product has the tax enabled, the product has the tax enabled for the clients and suppliers and I try to do an invoice directly in Odoo with the same product working fine.

I think that the main problem is how to create the relation between invoice line and the tax, because after creating invoice line appears next field:

["invoice_line_tax_id"]=> array(0) { }

But in an correct invoice line appears as:

["invoice_line_tax_id"]=> array(1) { [0]=> int(4) }

One person in other forum has suggested to install account.tax module, but that module depends on other module (base table) that generates an error during their installation and I don't want to depends on other modules if it's possible.

Well, I had been struggling for most of the afternoon with the same issue. Then I found this question, which triggered some ideas...after poking around the database a bit further I found a solution! Here it is:

The relationship between the invoice line and the taxes is a many-to-many relationship. So there is no invoice_line_tax_id field in the account_invoice_line table. The relationship is instead stored in the account_invoice_line_tax table. Importantly, this table needs a valid account_invoice_line ID before new taxes can be assigned. So what I did is (using Python and OERPlib) is:

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