Merge lp:~camptocamp/openerp-swiss-localization/6.1-fix-1108936 into lp:~camptocamp/openerp-swiss-localization/6.1

Proposed by Yannick Vaucher @ Camptocamp
Status: Merged
Merged at revision: 105
Proposed branch: lp:~camptocamp/openerp-swiss-localization/6.1-fix-1108936
Merge into: lp:~camptocamp/openerp-swiss-localization/6.1
Diff against target: 98 lines (+13/-13)
1 file modified
l10n_ch/bank_view.xml (+13/-13)
To merge this branch: bzr merge lp:~camptocamp/openerp-swiss-localization/6.1-fix-1108936
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp Approve
Review via email: mp+145385@code.launchpad.net

Commit message

[FIX] Restore default behavior of bank field. Call onchange_bank_id when the bank field is modified. Display the bank field only if the user is in group_extended

Description of the change

Some whitespace clean up
+
Fix onchange in res_partner_bank view form

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

note : the MP does 2 different things and the commit messages should reflect this:

1. the bank field is not always displayed
2. when it is displayed, then an onchange is added

(plus various whitespace cleanups cluttering the diff)

LGTM

review: Approve
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

> note : the MP does 2 different things and the commit messages should reflect
> this:

I updated the suggested commit message for the merge. Feel free to edit if required.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Hello thanks for the review. Your commit message LGTM :)

Or perhaps we should specify that we restore the default behavior of this field.

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

> Hello thanks for the review. Your commit message LGTM :)
>
> Or perhaps we should specify that we restore the default behavior of this
> field.

Ah ok, I was not aware of this aspect of things.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Feel free to merge it when you can :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ch/bank_view.xml'
2--- l10n_ch/bank_view.xml 2012-06-28 13:11:31 +0000
3+++ l10n_ch/bank_view.xml 2013-01-29 14:47:41 +0000
4@@ -1,7 +1,7 @@
5 <?xml version="1.0" encoding="utf-8"?>
6 <openerp>
7 <data>
8- <!-- res.bank base form-->
9+ <!-- res.bank base form-->
10 <record model="ir.ui.view" id="view_res_bank_form">
11 <field name="name">res.bank.form</field>
12 <field name="model">res.bank</field>
13@@ -16,7 +16,7 @@
14 </field>
15 </field>
16 </record>
17-
18+
19 <!-- res.bank base tree-->
20 <record model="ir.ui.view" id="l10nch_view_res_bank_tree">
21 <field name="name">res.bank.tree</field>
22@@ -30,10 +30,10 @@
23 </field>
24 </field>
25 </record>
26-
27+
28 <!-- res.partner.bank in res partner form-->
29 <!-- Partner -> Bank Details -->
30-
31+
32 <record model="ir.ui.view" id="l10nch_view_res_partner_bank_hide_f1">
33 <field name="name">res.partner_bank.form.hide.f1</field>
34 <field name="model">res.partner</field>
35@@ -54,7 +54,7 @@
36 </field>
37 </field>
38 </record>
39-
40+
41 <record model="ir.ui.view" id="l10nch_view_res_partner_bank_add_groups">
42 <field name="name">res.partner_bank.form.hide.f2</field>
43 <field name="model">res.partner</field>
44@@ -102,7 +102,7 @@
45 <field name="type">form</field>
46 <field name="inherit_id" ref="base.view_partner_bank_form"/>
47 <field name="arch" type="xml">
48- <field name="bank" position="replace">
49+ <field name="bank" position="replace">
50 </field>
51 </field>
52 </record>
53@@ -115,7 +115,7 @@
54 <field name="arch" type="xml">
55 <field name="state" position="after">
56 <newline/>
57-
58+
59 <separator colspan="4" string="Account infos"/>
60 <newline/>
61 <group string="Bank account info" colspan="4" attrs="{'invisible': [('state','in', ['bvpost','bvrpost'])]}" >
62@@ -141,10 +141,10 @@
63 </group>
64 </group>
65 <newline/>
66- <field name="bank" />
67+ <field name="bank" on_change="onchange_bank_id(bank)" groups="base.group_extended"/>
68 </field>
69 </field>
70- </record>
71+ </record>
72
73 <!-- res.partner form bank list-->
74 <!-- Adding Type and bank name -->
75@@ -156,11 +156,11 @@
76 <field name="arch" type="xml">
77 <xpath expr="/form/notebook/page/field[@name='bank_ids']/tree/field[@name='acc_number']" position="before">
78 <field name="state" />
79- <field name="bank" />
80+ <field name="bank" />
81 </xpath>
82 </field>
83 </record>
84-
85+
86 <!-- res.partner form bank list-->
87 <!-- Adding Type and bank name -->
88 <record id="l10nch_view_partner_bank_invoice_tree" model="ir.ui.view">
89@@ -171,8 +171,8 @@
90 <field name="arch" type="xml">
91 <field name="acc_number" position="before">
92 <field name="state" />
93- <field name="bank" />
94- </field>
95+ <field name="bank" on_change="onchange_bank_id(bank)" groups="base.group_extended"/>
96+ </field>
97 </field>
98 </record>
99

Subscribers

People subscribed via source and target branches

to all changes: