[FIX] project: Message not been translated : (Maintenance Case : 575766)

bzr revid: rgo@tinyerp.com-20120614112351-jmq1xri315byqr33
This commit is contained in:
Ravi Gohil (Open ERP)
2012-06-14 16:53:51 +05:30
parent 95b323f398
commit 94ffedd928
+3 -3
View File
@@ -1139,12 +1139,12 @@ class account_analytic_account(osv.osv):
vals['child_ids'] = []
return super(account_analytic_account, self).create(cr, uid, vals, context=context)
def unlink(self, cr, uid, ids, *args, **kwargs):
def unlink(self, cr, uid, ids, context=None):
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, uid, [('analytic_account_id','in',ids)], context=context)
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)
return super(account_analytic_account, self).unlink(cr, uid, ids, context=context)
account_analytic_account()