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

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

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

Hello,

Currently cannot unlink analytic account when project module is installed, we 
need to
provide project access rights to current user even if that user does not belong 
to
project management part.

Please review it.

Thanks,
Rifakat
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-572490-rha/+merge/96965
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-572490-rha.
=== modified file 'project/project.py'
--- project/project.py	2012-02-15 14:51:12 +0000
+++ project/project.py	2012-03-12 05:10:24 +0000
@@ -1140,7 +1140,7 @@
 
     def unlink(self, cr, uid, ids, *args, **kwargs):
         project_obj = self.pool.get('project.project')
-        analytic_ids = project_obj.search(cr, uid, [('analytic_account_id','in',ids)])
+        analytic_ids = project_obj.search(cr, 1, [('analytic_account_id','in',ids)])
         if analytic_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