[FIX] account: default statement line date as today if do not get context date
authorRavi Gohil (Open ERP) <rgo@tinyerp.com>
Thu, 15 Mar 2012 13:47:26 +0000 (19:17 +0530)
committerRavi Gohil (Open ERP) <rgo@tinyerp.com>
Thu, 15 Mar 2012 13:47:26 +0000 (19:17 +0530)
bzr revid: rgo@tinyerp.com-20120315134726-mzj01bzjveptcmhc

1  2 
addons/account/account_bank_statement.py

@@@ -472,7 -472,7 +472,7 @@@ class account_bank_statement_line(osv.o
      }
      _defaults = {
          'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
--        'date': lambda self, cr, uid, context, *a: context.get('date'),
++        'date': lambda self, cr, uid, context, *a: context.get('date') or time.strftime('%Y-%m-%d'),
          'type': 'general',
      }