[FIX]: small default value fix
bzr revid: mga@tinyerp.com-20100628180536-hg3v0ylk4zfuu66t
This commit is contained in:
parent
88af110a66
commit
573b05d6b6
|
@ -84,6 +84,7 @@ class account_bank_statement_line(osv.osv):
|
|||
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]
|
||||
|
||||
_inherit = 'account.bank.statement.line'
|
||||
|
@ -91,7 +92,7 @@ class account_bank_statement_line(osv.osv):
|
|||
'company_id':fields.many2one('res.company', 'Company', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||
'company_id': _default_company,
|
||||
}
|
||||
account_bank_statement_line()
|
||||
|
||||
|
|
Loading…
Reference in New Issue