← Back to team overview

banking-addons-team team mailing list archive

[Merge] lp:~therp-nl/banking-addons/ba61-lp1246642 into lp:banking-addons/6.1

 

Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/banking-addons/ba61-lp1246642 into lp:banking-addons/6.1.

Requested reviews:
  Banking Addons Core Editors (banking-addons-team)
Related bugs:
  Bug #1246642 in Banking Addons: "Cannot confirm bank statements with more than one unconfirmed line"
  https://bugs.launchpad.net/banking-addons/+bug/1246642

For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/ba61-lp1246642/+merge/193397
-- 
https://code.launchpad.net/~therp-nl/banking-addons/ba61-lp1246642/+merge/193397
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~therp-nl/banking-addons/ba61-lp1246642 into lp:banking-addons/6.1.
=== modified file 'account_banking/banking_import_transaction.py'
--- account_banking/banking_import_transaction.py	2013-09-05 21:44:46 +0000
+++ account_banking/banking_import_transaction.py	2013-10-31 10:13:52 +0000
@@ -1892,7 +1892,13 @@
             if st_line.import_transaction_id:
                 import_transaction_obj.confirm(
                     cr, uid, st_line.import_transaction_id.id, context)
-            st_line.refresh()
+            # Workaround for
+            # https://bugs.launchpad.net/openobject-server/+bug/1238042
+            # Need to rebrowse instead of refresh, because any parent company
+            # will be in the browse record's id cache after the first pass, and
+            # accessing the actual company will then trigger a read attempt on
+            # the inaccessible parent company too, leading to an access error.
+            st_line = self.browse(cr, uid, st_line.id, context=context)
             st_line_number = statement_pool.get_next_st_line_number(
                 cr, uid, st_number, st_line, context)
             company_currency_id = st.journal_id.company_id.currency_id.id


Follow ups