Rifakat (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-572490-rha into 
lp:openobject-addons/6.0.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)
Related bugs:
  Bug #932641 in OpenERP Addons: "[trunk 6.1] cannot unlink analytic account 
due to project module"
  https://bugs.launchpad.net/openobject-addons/+bug/932641

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-572490-rha/+merge/96970

Hello,

User can unlink analytic account without providing project access rights to the 
user.

Please review this fix.

Regards,
Rifakat
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-572490-rha/+merge/96970
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-572490-rha.
=== modified file 'project/project.py'
--- project/project.py	2012-03-01 11:19:13 +0000
+++ project/project.py	2012-03-12 05:52:19 +0000
@@ -758,7 +758,7 @@
     
     def unlink(self, cr, uid, ids, *args, **kwargs):
         project_obj = self.pool.get('project.project')
-        project_ids = project_obj.search(cr, uid, [('analytic_account_id','in',ids)])
+        project_ids = project_obj.search(cr, 1, [('analytic_account_id','in',ids)])
         if project_ids:
             raise osv.except_osv(_('Warning !'), _('Please delete the project linked with this account first.'))
         return super(account_analytic_account, self).unlink(cr, uid, ids, *args, **kwargs)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to