openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #08840
[Bug 932641] Re: [trunk 6.1] cannot unlink analytic account due to project module
** Project changed: openobject-server => openobject-addons
** Changed in: openobject-addons
Importance: Undecided => Low
** Changed in: openobject-addons
Status: New => Confirmed
** Changed in: openobject-addons
Status: Confirmed => In Progress
--
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/932641
Title:
[trunk 6.1] cannot unlink analytic account due to project module
Status in OpenERP Addons (modules):
In Progress
Bug description:
Hi,
When you install the project module, the unlink method of
account.analytic.account is modified to check that no project exists
on this account.
addons/project/project.py(1144)unlink()
-> def unlink(self, cr, uid, ids, *args, **kwargs):
1144 -> def unlink(self, cr, uid, ids, *args, **kwargs):
1145 project_obj = self.pool.get('project.project')
1146 analytic_ids = project_obj.search(cr, uid, [('analytic_account_id','in',ids)])
1147 if analytic_ids:
1148 raise osv.except_osv(_('Warning !'), _('Please delete the project linked with this account first.'))
1149 return super(account_analytic_account, self).unlink(cr, uid, ids, *args, **kwargs)
The issue is that the check at line 1146 is executed with current uid and that forces to give read access to project.project to current uid. This means that when you install the project module, you have to give project rights to your users using analytic accounting even if they don't use project at all.
So either a user having analytic accounting access rights should always get project access rights when you install the project module, or the check at line 1146 should be performed with uid=1
J-E
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/932641/+subscriptions
References