← Back to team overview

openerp-community team mailing list archive

[Merge] lp:~openerp-community/openobject-addons/trunk-bug-1102217 into lp:openobject-addons

 

Ishwar Malvi (OpenERP) has proposed merging lp:~openerp-community/openobject-addons/trunk-bug-1102217 into lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1102217 in OpenERP Addons: "[7.0/trunk] Opening With Last Closing Balance error"
  https://bugs.launchpad.net/openobject-addons/+bug/1102217

For more details, see:
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bug-1102217/+merge/149798

fixed Opening With Last Closing Balance error
-- 
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bug-1102217/+merge/149798
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/trunk-bug-1102217.
=== modified file 'account/account_cash_statement.py'
--- account/account_cash_statement.py	2012-12-17 15:23:03 +0000
+++ account/account_cash_statement.py	2013-02-21 11:10:28 +0000
@@ -200,7 +200,7 @@
             if journal.with_last_closing_balance == True:
                 domain = [('journal_id', '=', journal.id),
                           ('state', '=', 'confirm')]
-                last_bank_statement_ids = self.search(cr, uid, domain, limit=1, order='create_date desc', context=context)
+                last_bank_statement_ids = self.search(cr, uid, domain, limit=1, order='closing_date desc', context=context)
                 if last_bank_statement_ids:
                     last_bank_statement = self.browse(cr, uid, last_bank_statement_ids[0], context=context)