'account.invoice.tax' should have a many2one relation to corresponding 'account.tax'

Asked by Akshay Jain

'account.invoice.tax' should have a many2one relation to corresponding 'account.tax'
This is needed as we need to show the type of tax (percent, fixed, etc) and tax rate (field: 'amount' of object 'account.tax') on invoice print outs and currently the tax lines (account.invoice.tax) stored with account.invoice do not contain this info and neither do account.invoice.tax has any many2one relation with corresponding account.tax object.
If I am wrong then please tell me how to access the tax type and tax rate on invoice printouts?

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Akshay Jain
Solved:
Last query:
Last reply:
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#1

Hello,

You can take account.tax which is a many2many relation in account invoice line, from invoice line you can access tax type and tax rate easily.

Thanks.

Revision history for this message
Akshay Jain (akshay-jain-7983) said :
#2

I disagree with this solution...picture this...

there are 2 taxes:
tax A -> base code X, tax code Y, account Z
tax B -> base code X, tax code Y, account Z
(yes, in India we need to have 2 different taxes with same base code, same tax code and same account but need to show them as different on invoices)

now on an invoice suppose following are invoice lines:
product M -> tax A
product N -> tax A
product O -> tax B
product P -> tax B
product Q -> tax A, tax B

Now the invoice tax (account.invoice.tax) lines would be:
tax A
tax B

Now if I need to print the above two taxes on invoices and i try to get the rates from invoice lines then u can understand how much overhead that involves. Rather it is much more sensible and logical to have tax lines related to 'account.tax' and each tax line to have unique identity on basis of 'account.tax' rather than on (base code, tax code, account) combination as is now.

What say?

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#3

Hello Akshay Jain,

In current situation if you want to show both the taxes will show in separate then for that you need to assign base code or tax code uniquely not same then and then only you will able to see both separately in "account.invoice.tax", Other wise you need to done some customization from your side.
If you want this in tiny then for that please create blue-prints.

thanks.

Revision history for this message
Akshay Jain (akshay-jain-7983) said :
#4

i did it myself...just had to modify a little code in account.invoice.tax class in invoice.py file in account module.

But yes i am greatly impressed with the open erp's maturity as an enterprise class software...great job guys..keep doing the great stuff!!

Revision history for this message
Akshay Jain (akshay-jain-7983) said :
#5

Working on blueprints.