[FIX] recursion
authorFabien Pinckaers <fp@openerp.com>
Thu, 21 Aug 2014 08:43:49 +0000 (10:43 +0200)
committerFabien Pinckaers <fp@openerp.com>
Thu, 21 Aug 2014 08:43:49 +0000 (10:43 +0200)
addons/account/account_cash_statement.py

index f01e95c..0540d57 100644 (file)
@@ -80,7 +80,8 @@ class account_cash_statement(osv.osv):
             if (statement.journal_id.type not in ('cash',)):
                 continue
             if not statement.journal_id.cash_control:
-                statement.write({'balance_end_real' : statement.balance_end})
+                if statement.balance_end_real <> statement.balance_end:
+                    statement.write({'balance_end_real' : statement.balance_end})
                 continue
             start = end = 0
             for line in statement.details_ids: