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

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 154
Proposed branch: lp:~therp-nl/banking-addons/ba61-lp1073521_force_alternative_move_line_tree_view
Merge into: lp:banking-addons/6.1
Diff against target: 26 lines (+15/-1)
1 file modified
account_banking/wizard/banking_transaction_wizard.xml (+15/-1)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/ba61-lp1073521_force_alternative_move_line_tree_view
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Approve
Review via email:
To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Shouldn't it be 'view_mode': 'tree'?

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Ok, I understood by reading the fields_view_get override in account/

1009 if context.get('view_mode', False):
1010 return result

Whatever context['view_mode'] contains, it will return early and won't replace your view by the hardcoded one.

That's a bit disturbing but should work to workaround the bug.

review: Approve
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Yes, I could have annotated that I used a nonsense value to reflect the nonsense of the code that it needs to interact with. Thank you for finding that out yourself.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking/wizard/banking_transaction_wizard.xml'
2--- account_banking/wizard/banking_transaction_wizard.xml 2012-02-25 01:15:48 +0000
3+++ account_banking/wizard/banking_transaction_wizard.xml 2013-01-13 14:15:23 +0000
4@@ -93,7 +93,21 @@
5 </page>
6 <page string="Manual match">
7 <field name="manual_invoice_id"/>
8- <field name="manual_move_line_id"/>
9+ <!--
10+ Specify alternative tree_view_ref as a
11+ workaround for lp:1073521 in OpenERP 6.1
12+ Need to also define 'view_mode' to prevent
13+ an instant editable tree view
14+ reconstruction by account.move.line's
15+ fields_view_get().
16+ Both are not needed in OpenERP 6.0 or 7.0.
17+ -->
18+ <field name="manual_move_line_id"
19+ context="{
20+ 'tree_view_ref': 'account.view_move_line_tax_tree',
21+ 'view_mode': 'yes'
22+ }"
23+ />
24 <newline/>
25 <button colspan="1"
26 name="trigger_write"


People subscribed via source and target branches