From 301726255935bb19facdb5d28f51e40b89cdc8fb Mon Sep 17 00:00:00 2001 From: vra Date: Wed, 18 Aug 2010 17:39:22 +0530 Subject: [PATCH] [IMP] account: comment the duplicate assignment of company_id field in '_defaults' of account object. bzr revid: vra@tinyerp.com-20100818120922-nwgwvko3v9zgwfyr --- addons/account/account.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index ff5e8d4db82..9042d1ab3dc 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -418,16 +418,16 @@ class account_account(osv.osv): 'level': fields.function(_get_level, string='Level', method=True, store=True, type='integer'), } - def _default_company(self, cr, uid, context={}): - user = self.pool.get('res.users').browse(cr, uid, uid, context=context) - if user.company_id: - return user.company_id.id - return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0] +# def _default_company(self, cr, uid, context={}): +# user = self.pool.get('res.users').browse(cr, uid, uid, context=context) +# if user.company_id: +# return user.company_id.id +# return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0] _defaults = { 'type': lambda *a : 'view', 'reconcile': lambda *a: False, - 'company_id': _default_company, + #'company_id': _default_company, 'active': lambda *a: True, 'check_history': lambda *a: True, 'currency_mode': lambda *a: 'current',