[FIX] account : default date on statement lines should be the statement date
authorStéphane Bidoul <>
Fri, 26 Aug 2011 09:57:26 +0000 (15:27 +0530)
committerBharat (OpenERP) <bde@tinyerp.com>
Fri, 26 Aug 2011 09:57:26 +0000 (15:27 +0530)
lp bug: https://launchpad.net/bugs/833049 fixed

bzr revid: bde@tinyerp.com-20110826095726-0duq2iuhjzpnzh90

addons/account/account_bank_statement.py
addons/account/account_view.xml

index f712cc9..53610a7 100644 (file)
@@ -470,7 +470,7 @@ class account_bank_statement_line(osv.osv):
     }
     _defaults = {
         'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
-        'date': lambda *a: time.strftime('%Y-%m-%d'),
+        'date': lambda self,cr,uid,context={}: context.get('date', time.strftime('%Y-%m-%d')),
         'type': 'general',
     }
 
index 5de205e..a77d7eb 100644 (file)
                     </group>
                     <notebook colspan="4">
                         <page string="Transaction" name="statement_line_ids">
-                            <field colspan="4" name="line_ids" nolabel="1">
+                            <field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
                                 <tree editable="bottom" string="Statement lines">
                                     <field name="sequence" readonly="1" invisible="1"/>
                                     <field name="date" groups="base.group_extended"/>