openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #11197
[Bug 993961] Re: taxes reports fails if there are many companies/taxes
** Branch linked: lp:~openerp-dev/openobject-addons/6.0-bug-805403-rha
** Changed in: openobject-addons
Status: New => Confirmed
** Changed in: openobject-addons
Importance: Undecided => Medium
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/993961
Title:
taxes reports fails if there are many companies/taxes
Status in OpenERP Addons (modules):
Confirmed
Bug description:
observed in v6. server 3616 addons 5218 both with gtk and web client
This bug is not very obvious to reproduce. If you have a database with many tax_codes, for example one with 6 companies, all with their respective charts, with 'demo user' the 'taxes report' fails with an
Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: Tax Code).
The problem arises here:
http://bazaar.launchpad.net/~openerp/openobject-
addons/6.0/view/head:/account/wizard/account_vat.py#L47
What happens is that data['ids'] contains the ID of something that is
not a tax code. If that ID is big, so that there isn't a tax code with
that ID, the report works fine. This happens with a clean DB with demo
data.
On the other hand, if you have many tax codes and many companies, you
could get a situation where the tax code with that ID exists but it is
not readable by the user. That causes the permission error above and
the report fails.
You can manually reproduce the situation by creating a second company
(no need to actually set up a chart of accounts) and then put a pdb to
find out what is context['active_ids'] there.
Then, create via SQL a tax_code with id = context['active_ids'] above,
and company = the second company.
The tax report should fail.
Another option to reproduce that is to create 5 or 6 companies, set up
the accounts and taxes on each of them, try the report and have luck.
Of course, if that is not quite clear I can provide more info, or a
video, or a dump.
Thanks!
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/993961/+subscriptions
References