From 69549b1571f4b6e03e6e91268bf36f7d091efbe0 Mon Sep 17 00:00:00 2001 From: vth Date: Tue, 19 Oct 2010 11:18:51 +0530 Subject: [PATCH] [FIX] account : accout/configration/miscellanious/recurring models add default value to the company_id bzr revid: vth@tinyerp.com-20101019054851-cqupju2q8vgeil9n --- addons/account/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index ecadfaf..3eedfc7 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -458,7 +458,7 @@ class account_account(osv.osv): ids = self.search(cr, user, [('name', operator, name)]+ args, limit=limit) if not ids and len(name.split()) >= 2: #Separating code and name of account for searching - operand1,operand2 = name.split(' ',1) #name can contain spaces e.g. OpenERP S.A. + operand1,operand2 = name.split(' ',1) #name can contain spaces e.g. OpenERP S.A. ids = self.search(cr, user, [('code', operator, operand1), ('name', operator, operand2)]+ args, limit=limit) else: ids = self.search(cr, user, args, context=context, limit=limit) @@ -2025,6 +2025,7 @@ class account_model(osv.osv): _defaults = { 'legend': lambda self, cr, uid, context:_('You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s: To Specify Year \n%(month)s: To Specify Month \n%(date)s: Current Date\n\ne.g. My model on %(date)s'), + 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.model', context=c), } def generate(self, cr, uid, ids, datas={}, context=None): move_ids = [] -- 1.7.10.4