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

Proposed by Stefan Rijnhart (Opener) on 2013-10-31
Status: Merged
Merged at revision: 188
Proposed branch: lp:~therp-nl/banking-addons/ba61-lp1246642
Merge into: lp:banking-addons/6.1
Diff against target: 18 lines (+7/-1)
1 file modified
account_banking/banking_import_transaction.py (+7/-1)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/ba61-lp1246642
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Approve on 2013-11-11
Holger Brunn (Therp) code review 2013-10-31 Approve on 2013-11-04
Review via email: mp+193397@code.launchpad.net
To post a comment you must log in.
review: Approve (code review)
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking/banking_import_transaction.py'
2--- account_banking/banking_import_transaction.py 2013-09-05 21:44:46 +0000
3+++ account_banking/banking_import_transaction.py 2013-10-31 10:13:52 +0000
4@@ -1892,7 +1892,13 @@
5 if st_line.import_transaction_id:
6 import_transaction_obj.confirm(
7 cr, uid, st_line.import_transaction_id.id, context)
8- st_line.refresh()
9+ # Workaround for
10+ # https://bugs.launchpad.net/openobject-server/+bug/1238042
11+ # Need to rebrowse instead of refresh, because any parent company
12+ # will be in the browse record's id cache after the first pass, and
13+ # accessing the actual company will then trigger a read attempt on
14+ # the inaccessible parent company too, leading to an access error.
15+ st_line = self.browse(cr, uid, st_line.id, context=context)
16 st_line_number = statement_pool.get_next_st_line_number(
17 cr, uid, st_number, st_line, context)
18 company_currency_id = st.journal_id.company_id.currency_id.id

Subscribers

People subscribed via source and target branches