v6 account invoice - multiple taxes for the same invoice get ignored

Bug #717803 reported by Vadim - Enapps LTD
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Won't Fix
Wishlist
Unassigned

Bug Description

I just noticed this bug:

When you try to make a purchase invoice and if you have invoice lines with different tax codes, they will be ignored in the 'Taxes' box and only the top line's tax code will be shown. I am pretty sure it was not always like this.

To replicate:
tax code a - 0.0 %
tax code b - 17.5 %

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Vadim,

Which taxes you have set in your configuration?
Because I have checked your issue at my end with three different taxes and it gives the result as expected.

So would you please elaborate with more information or provide the proper taxes configuration which have set.

Thanks.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

HI Amit,

these - https://code.launchpad.net/~uk-openerp-alliance/l10n-openerp-uk/trunk

PT0 - zero rated taxes
PT1 - standard rated - 17.5%

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Vadim,

I have checked your issue with the uk chat of account on official addons module and it is working as expected.

I think the problem is in your customized code. So I am closing this issue.

I have attached a video for your reference, so please check it.

Thanks

Changed in openobject-addons:
status: Incomplete → Invalid
Revision history for this message
Amit Parik (amit-parik) wrote :
Changed in openobject-addons:
status: Invalid → New
Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

Amit, the problem is with the logic:

In your video the 5% tax is set to account code 220500 and the 17.5% is to 220000

if you change your tax structure so all purchase taxes are using the same nominal account, then you will find the same problem as I do.

From the accounting point of view - there is no need to have separate nominal accounts for each vat code if that is setup in the tax structure, so this is a bug and I am not happy you close it without confirming all the details first.

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Vadim,

Would you please provide me more information with respect of proper example and screen-shots?

Thanks

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

thanks Amit, I will send you privatelly a bit later the link to the db that you can access.

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Vadim,

Thanks for your reply but I could not fine the database (11feb) which you have described in mail at your IP.

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

Hi Amit, I sent you the correct IP - did you manage to connect and replicate the bug?

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Vadim,

Thanks for the reply. I have checked your system, the problem is in your tax configuration.

You had assign a same "Account Base code" and "Account Tax code" for the both "Standard rate purchases (17.5%)" tax and "Zero rated purchases" tax, So due to this configuration the invoice will combine all those two taxes in to single tax code line.

If you need all those two taxes in two separate or individual line assign two different "Account Base code" and "Account Tax code" in your tax configuration.

Hope this will helpful for you.

Thanks again

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

Hi Amit, I am aware of this and this is a problem with the invoice logic, not my COA - I dont want to have multuple account.account codes for each tax line and I do not see any reason why openerp is configured, so it groups the taxes that way if they are using the same "Account Base code" and "Account Tax code"

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Vadim,

This type of configuration has been available since 5.0 and we can not consider it to generic solution.
So I am set it to Opinion.

Thanks.

Changed in openobject-addons:
status: New → Opinion
Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote : RE: [Bug 717803] Re: v6 account invoice - multiple taxes for the same invoice get ignored

Hi Amit, can you please do an internal consultation on this to bring, so who is in charge of the accounting development is aware of this bug.

The fact that it was the same for v5 is not a good enough excuse to leave it like that - this is wrong logic and therefore a bug in the concept.

Thanks,

Vadim

Revision history for this message
Amit Parik (amit-parik) wrote :

Would you please share your views regarding above issue.

Thanks

Revision history for this message
qdp (OpenERP) (qdp) wrote :

Hi Vadim,

i share the point of view of Amit: the reason we made the system like that is that if you have several lines (let say 15) in your invoice that are using the same tax rate, then we assume that you don't want to see in the tax box (neither in the invoice print report) the detail of the 15 taxes computation, but only one line that sums up all of them. So that's the reason why the system is grouping using the tax codes and tax account.

As Amit said, if this behavior doesn't fit your needs, then you should consider creating a base or tax code for each tax rate, or assign them to a different account... But we can't remove this feature because we think it's generic and needed.

I hope your understand better our position now.

Thanks for the contribution,
Quentin

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote : RE: [Openerp-expert-accounting] [Bug 717803] Re: v6 account invoice - multiple taxes for the same invoice get ignored

Hi Quentin,

> if you have several lines (let say 15) in your invoice that are using the same tax rate

totally agree with you on this one - if you have 15 products with the same rate, no point in showing the computations of course. yet this is the thing - my tax rates are different - as you can see in the first post - 0% and 17.5%

> that's the reason why the system is grouping using the tax codes and tax account.

absolutely right - and this is the way it should be - all the tax lines must be grouped by the tax type - please see my server setup on this - PT0 - 0%, PT1 - 17.5%, PT11 - 20% and in the UK we dont need to have different account_account lines for each tax line. i.e. - the localised UK accounting systems's COA is set with just 2 nominal codes - input VAT and output VAT.

As mentioned, I do not see why the invoice object is grouping these tax lines if they have the same nominal codes (account.account.id)

Thanks,

Vadim

p.s. - I dont have a problem with fixing this myself - i just bring something out that doesnt have a good logic and I try to contribute to improve the system, so it will be easily adopted in UK as well by the most sceptical accountants.

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

Hi,
Can you please confirm if this will be fixed?

Changed in openobject-addons:
status: Opinion → New
Revision history for this message
TeMPO (info-tempo-consulting) wrote :

Dear all,

I fully agree with Vadim : the tax lines should not be grouped if they have different rates no matter if they are using or not the same account code

Maybe it was already done like this in V5, but the actual behaviour is very restrictive since it forces you to build your COA
following a logic which is "hard coded" in OpenERP.

So +1 to have this behaviour changed

Revision history for this message
qdp (OpenERP) (qdp) wrote :

Hi again,

i don't think that the percentage is a good way to (un)group the tax: there are probably lot of use cases where a tax has to be grouped with another but where the percentage is different... Like, for example, a tax that would have a percentage defined on range: if amount between 0 and X => rate is x%, if amount between X and Y => rate is y%... those tax lines have different percentage but should apperas as one line on the invoice.

I'd like also to emphasize that the system we made isn't hardcoded at all and is flexible enough to allow people to decide how they want to group tax lines on invoices. It will group the tax lines that share the same
*account
*base code
*tax code
So if openERP is grouping something that you don't want, you have the possibility to choose between creating a specific account OR a specific base/tax code for that.

I hope i managed to convince you, as we don't plan to work on this for next version :-) If it's not the case and you think it's really an important lack, please feel free to create a poll on http://feedback.openerp.com. In the meanwhile, i'm closing definitelly this bug report for the sake of clarity.

Thanks for your understanding,
Quentin

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote : RE: [Bug 717803] Re: v6 account invoice - multiple taxes for the same invoice get ignored

Quentin, lets look at this from a different perspective: what is the purpose of grouping the tax lines if their account_account codes are the same?

By fixing this, you just introduce a more consistent logic which wont affect anyone:

Those that have used different account_account codes for each tax line will not be affected and those that do not want to have a different account_account for each tax will not come across this bug.
Thanks,

Vadim

qdp (OpenERP) (qdp)
Changed in openobject-addons:
importance: Undecided → Wishlist
status: New → Won't Fix
Revision history for this message
qdp (OpenERP) (qdp) wrote :

i almost forgot to close this bug report and in the meanwhile you had answered, Vadim.

> what is the purpose of grouping the tax lines if their account_account codes are the same?
well, actually the purpose is that: we _need_ a way to group tax line on the invoice, and we need a way generic to do so (on that, we both agree, i think). This way is not worst than another and it's more reliable than using the percentage rate.

i hope this help,
Quentin

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

I am not saying you should group by percentage rate!
Yopu should group by tax line as you do now, but ignore the account_account from the tax properties

Revision history for this message
TeMPO (info-tempo-consulting) wrote :

Dear Quentin and Vadim

I was the one who introduced by mistake the concept of grouping by tax rate which is not good
By saying that I was assuming that you have only one percentage corresponding with one tax line which
may or not be the case.
I fully support the point of view of Vadim just group lines by tax line with no treatment on the account defined in the tax

Maurice

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

In case anyone is looking for a fix to this, in account/invoice.py find line
key = (val['tax_code_id'], val['base_code_id'], val['account_id'])
and replace with:
key = (val['base'])

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

In addition to the above, the def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj) needs cleaned up.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.