[FIX] sale_crmconvert target and forcat fields to float from int
[odoo/odoo.git] / addons / analytic / analytic.py
index ce79c4d..14c8f71 100644 (file)
@@ -33,9 +33,9 @@ class account_analytic_account(osv.osv):
     _description = 'Analytic Account'
     _track = {
         'state': {
-            'analytic.mt_account_pending': lambda self, cr, uid, obj, ctx=None:  obj['state'] == 'pending',
-            'analytic.mt_account_closed': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'close',
-            'analytic.mt_account_opened': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'open',
+            'analytic.mt_account_pending': lambda self, cr, uid, obj, ctx=None: obj.state == 'pending',
+            'analytic.mt_account_closed': lambda self, cr, uid, obj, ctx=None: obj.state == 'close',
+            'analytic.mt_account_opened': lambda self, cr, uid, obj, ctx=None: obj.state == 'open',
         },
     }
 
@@ -295,10 +295,6 @@ class account_analytic_account(osv.osv):
             args=[]
         if context is None:
             context={}
-        if context.get('current_model') == 'project.project':
-            project_obj = self.pool.get("account.analytic.account")
-            project_ids = project_obj.search(cr, uid, args)
-            return self.name_get(cr, uid, project_ids, context=context)
         if name:
             account_ids = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context)
             if not account_ids: