Merge lp:~ruchir.shukla/banking-addons/new-banking-ui-improvment into lp:banking-addons

Proposed by Ruchir Shukla(BizzAppDev)
Status: Merged
Merged at revision: 213
Proposed branch: lp:~ruchir.shukla/banking-addons/new-banking-ui-improvment
Merge into: lp:banking-addons
Diff against target: 328 lines (+86/-63)
8 files modified
account_banking/__openerp__.py (+1/-0)
account_banking/account_banking.py (+1/-0)
account_banking/account_banking_view.xml (+10/-6)
account_banking/wizard/bank_import.py (+3/-1)
account_banking/wizard/bank_import_view.xml (+21/-20)
account_banking/wizard/banking_transaction_wizard.xml (+14/-10)
account_banking/wizard/link_partner.xml (+15/-10)
account_banking_payment/view/banking_transaction_wizard.xml (+21/-16)
To merge this branch: bzr merge lp:~ruchir.shukla/banking-addons/new-banking-ui-improvment
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Guewen Baconnier @ Camptocamp code review, no test Approve
Review via email: mp+199025@code.launchpad.net

Description of the change

Bank Transaction UI improvement to make wizards and other things compatible with V7.

- Import wizard > Change buttons form to meet V7 standard
- Replace menu items “Periodic processing > Banking” to position under “Bank
transactions”
- Imported bank statements > Download raw data. Preserve original filename
(so it opens directly in a text editor)
- Imported bank statements > Import date, show in country settings
- Link partner wizard > Change buttons form to meet V7 standard
- Import message (after import) form > Download raw data. Preserve original
filename (so it opens directly in a text editor)
- Import message (after import) form > Make text “error report” translatable
- Import message (after import) form > Change button to meet V7 standard
- Match transaction data form > Change buttons form to meet V7 standard

To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

LGTM

review: Approve (code review, no test)
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking/__openerp__.py'
2--- account_banking/__openerp__.py 2013-05-01 14:25:04 +0000
3+++ account_banking/__openerp__.py 2013-12-14 10:24:24 +0000
4@@ -106,4 +106,5 @@
5 recognized and made available at server (re)start.
6 ''',
7 'installable': True,
8+ 'auto_install': False,
9 }
10
11=== modified file 'account_banking/account_banking.py'
12--- account_banking/account_banking.py 2013-10-14 12:33:26 +0000
13+++ account_banking/account_banking.py 2013-12-14 10:24:24 +0000
14@@ -247,6 +247,7 @@
15 'file': fields.binary('Raw Data', readonly=True,
16 states={'draft': [('readonly', False)]}
17 ),
18+ 'file_name': fields.char('File name', size=256),
19 'log': fields.text('Import Log', readonly=True,
20 states={'draft': [('readonly', False)]}
21 ),
22
23=== modified file 'account_banking/account_banking_view.xml'
24--- account_banking/account_banking_view.xml 2013-06-04 10:18:31 +0000
25+++ account_banking/account_banking_view.xml 2013-12-14 10:24:24 +0000
26@@ -16,7 +16,10 @@
27 id="account_banking.menu_finance_banking_settings"
28 parent="account.menu_finance_configuration"
29 />
30-
31+ <menuitem action="account.action_view_bank_statement_tree"
32+ id="account.journal_cash_move_lines"
33+ sequence="18"
34+ parent="account.menu_finance_bank_and_cash"/>
35 <!-- Add a shortcut menu for bank accounts -->
36 <record model="ir.actions.act_window" id="action_account_banking_res_partner_banks">
37 <field name="name">Bank Accounts</field>
38@@ -105,7 +108,8 @@
39 <field name="date" />
40 <field name="user_id" />
41 <field name="state" />
42- <field name="file"/>
43+ <field name="file" filename="file_name"/>
44+ <field name="file_name" invisible="1"/>
45 <field name="format" />
46 </page>
47 <page string="Statements">
48@@ -142,17 +146,17 @@
49 <!-- Add a menu item for it -->
50 <menuitem name="Imported Bank Statements Files"
51 id="menu_action_account_banking_imported_files"
52- parent="account_banking.menu_finance_banking_actions"
53+ parent="account.menu_finance_bank_and_cash"
54 action="action_account_banking_imported_files"
55- sequence="12"
56+ sequence="15"
57 />
58
59 <!-- Add the import wizard to the menu -->
60 <menuitem name="Import Bank Statements File"
61 id="menu_account_banking_import_wizard"
62- parent="account_banking.menu_finance_banking_actions"
63+ parent="account.menu_finance_bank_and_cash"
64 action="wizard_account_banking_import_file"
65- sequence="15"/>
66+ sequence="12"/>
67
68 <!-- Add the import wizard to the statement's right menu -->
69 <act_window name="Import Bank Statements File"
70
71=== modified file 'account_banking/wizard/bank_import.py'
72--- account_banking/wizard/bank_import.py 2013-05-28 14:08:18 +0000
73+++ account_banking/wizard/bank_import.py 2013-12-14 10:24:24 +0000
74@@ -140,6 +140,7 @@
75 import_id = statement_file_obj.create(cr, uid, dict(
76 company_id = company.id,
77 file = statements_file,
78+ file_name = banking_import.file_name,
79 state = 'unfinished',
80 format = parser.name,
81 ))
82@@ -353,7 +354,7 @@
83 '%s: %s' % (_('Number of bank costs invoices created'),
84 results.bank_costs_invoice_cnt),
85 '',
86- '%s:' % ('Error report'),
87+ '%s:' % (_('Error report')),
88 '',
89 ]
90 text_log = '\n'.join(report + results.log)
91@@ -390,6 +391,7 @@
92 'error': [('readonly', True)],
93 },
94 ),
95+ 'file_name': fields.char('File name', size=256),
96 'file': fields.binary(
97 'Statements File', required=True,
98 help = ('The Transactions File to import. Please note that while it is '
99
100=== modified file 'account_banking/wizard/bank_import_view.xml'
101--- account_banking/wizard/bank_import_view.xml 2013-05-28 15:18:26 +0000
102+++ account_banking/wizard/bank_import_view.xml 2013-12-14 10:24:24 +0000
103@@ -5,15 +5,16 @@
104 <field name="name">account.banking.bank.import</field>
105 <field name="model">account.banking.bank.import</field>
106 <field name="arch" type="xml">
107- <form string="Import Bank Transactions File">
108- <group colspan="4" states="init,ready,error">
109- <separator colspan="4" string="Select the processing details:"/>
110- <field name="company" colspan="1"/>
111- <field name="file"/>
112- <newline />
113- <field name="parser"/>
114- <field name="state" invisible="1"/>
115- </group>
116+ <form string="Import Bank Transactions File" version="7.0">
117+ <group colspan="4" states="init,ready,error">
118+ <separator colspan="4" string="Select the processing details:"/>
119+ <field name="company" colspan="1"/>
120+ <field name="file" filename="file_name"/>
121+ <field name="file_name" invisible="1"/>
122+ <newline />
123+ <field name="parser"/>
124+ <field name="state" invisible="1"/>
125+ </group>
126 <notebook colspan="4">
127 <page attrs="{'invisible': [('state', '!=', 'review')]}" string="Transactions">
128 <field name="line_ids" colspan="4" nolabel="1">
129@@ -37,16 +38,16 @@
130 attrs="{'invisible': [('state', '!=', 'ready')]}" />
131 </page>
132 </notebook>
133- <group colspan="2" >
134- <button icon="gtk-cancel"
135- special="cancel"
136- states="init"
137- string="Cancel"/>
138- <button icon="gtk-ok"
139- string="Import"
140- states="init"
141- name="import_statements_file"
142- type="object"/>
143+ <footer>
144+ <div attrs="{'invisible': [('state', '!=', 'init')]}">
145+ <button string="Import" class="oe_highlight"
146+ states="init" name="import_statements_file"
147+ type="object"/>
148+ or
149+ <button class="oe_link" special="cancel"
150+ states="init" string="Cancel"/>
151+ </div>
152+
153 <button icon="gtk-close"
154 special="cancel"
155 string="Close"
156@@ -61,7 +62,7 @@
157 type="object"
158 string="Confirm"
159 states="review"/>
160- </group>
161+ </footer>
162 </form>
163 </field>
164 </record>
165
166=== modified file 'account_banking/wizard/banking_transaction_wizard.xml'
167--- account_banking/wizard/banking_transaction_wizard.xml 2013-08-12 09:20:12 +0000
168+++ account_banking/wizard/banking_transaction_wizard.xml 2013-12-14 10:24:24 +0000
169@@ -5,7 +5,7 @@
170 <field name="name">transaction.wizard.first</field>
171 <field name="model">banking.transaction.wizard</field>
172 <field name="arch" type="xml">
173- <form string="Match transaction">
174+ <form string="Match transaction" version="7.0">
175 <!-- fields used for form logic -->
176 <field name="statement_line_parent_id" invisible="True"/>
177 <field name="invoice_ids" invisible="True"/>
178@@ -36,22 +36,25 @@
179 <separator string="Multiple matches" colspan="2"/>
180 <label colspan="2" string="Multiple matches were found for this bank transfer. You must pick one of the matches or select a match manually below." />
181 </group>
182- <group attrs="{'readonly': [('match_multi', '!=', True)]}" col="8">
183+ </group>
184+ </group>
185+ <group>
186+ <newline/>
187 <!-- show if we have an invoice type match (but the user may need to select from multiple options)
188 or whenever there is an invoice_id (e.g. in case of a manual match)
189 -->
190 <field name='invoice_id'
191- attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'invoice'),('invoice_id', '=', False)]}"
192+ attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'invoice'),('invoice_id', '=', False)]}" colspan="2"
193 domain="[('id', 'in', invoice_ids[0][2])]"
194 />
195 <!-- show if we have a move type match or a manual match without an invoice_id
196 -->
197 <field name='move_line_id'
198- attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'move'),('invoice_id', '=', False)]}"
199+ attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'move'),('invoice_id', '=', False)]}" colspan="2"
200 domain="[('id', 'in', move_line_ids[0][2])]"
201 />
202- <field name='analytic_account_id' />
203- </group>
204+ <newline/>
205+ <field colspan="2" name='analytic_account_id' />
206 <button colspan="1"
207 name="trigger_write"
208 type="object"
209@@ -85,9 +88,11 @@
210 </page>
211 <!-- Manual selection -->
212 <page string="Manual match">
213+ <separator string="Match one or more invoices" colspan="4"/>
214 <field name="manual_invoice_ids" colspan="4"
215 context="{'search_default_partner_id': partner_id}"
216 />
217+ <separator string="Or match one or more entries" colspan="4"/>
218 <field name="manual_move_line_ids" colspan="4"
219 context="{'search_default_partner_id': partner_id}"
220 />
221@@ -118,11 +123,10 @@
222 </group>
223 </page>
224 </notebook>
225- <group colspan="2">
226- <separator/>
227+ <footer>
228 <button icon="gtk-ok" string="Close" special="cancel"/>
229- </group>
230- </group>
231+ </footer>
232+
233 </form>
234 </field>
235 </record>
236
237=== modified file 'account_banking/wizard/link_partner.xml'
238--- account_banking/wizard/link_partner.xml 2013-06-05 12:34:24 +0000
239+++ account_banking/wizard/link_partner.xml 2013-12-14 10:24:24 +0000
240@@ -6,7 +6,7 @@
241 <field name="type">form</field>
242 <field name="model">banking.link_partner</field>
243 <field name="arch" type="xml">
244- <form string="Link partner">
245+ <form string="Link partner" version="7.0" >
246 <group colspan="4" col="6" string="Transaction data">
247 <field name="ref" />
248 <field name="amount" />
249@@ -40,15 +40,20 @@
250 <field name="email" widget="email"/>
251 </group>
252 </group>
253- <button icon="gtk-cancel" string="Cancel" special="cancel" />
254- <button icon="gtk-ok" string="Create partner"
255- name="link_partner" type="object"
256- attrs="{'invisible': [('partner_id', '!=', False)]}"
257- />
258- <button icon="gtk-ok" string="Link existing partner"
259- name="link_partner" type="object"
260- attrs="{'invisible': [('partner_id', '==', False)]}"
261- />
262+ <footer>
263+ <button string="Create partner"
264+ name="link_partner" type="object"
265+ class="oe_highlight"
266+ attrs="{'invisible': [('partner_id', '!=', False)]}"
267+ />
268+ <button string="Link existing partner"
269+ class="oe_highlight"
270+ name="link_partner" type="object"
271+ attrs="{'invisible': [('partner_id', '==', False)]}"
272+ />
273+ or
274+ <button class="oe_link" string="Cancel" special="cancel" />
275+ </footer>
276 </form>
277 </field>
278 </record>
279
280=== modified file 'account_banking_payment/view/banking_transaction_wizard.xml'
281--- account_banking_payment/view/banking_transaction_wizard.xml 2013-08-12 09:20:35 +0000
282+++ account_banking_payment/view/banking_transaction_wizard.xml 2013-12-14 10:24:24 +0000
283@@ -12,24 +12,29 @@
284 </field>
285 <xpath expr="//group/separator[@string='Multiple matches']/.."
286 position="after">
287- <field name='payment_line_id'
288- attrs="{'invisible': [('match_type', 'not in',
289- ('storno', 'payment', 'payment_manual'))]}"
290- />
291+ <group>
292+ <field name='payment_line_id'
293+ attrs="{'invisible': [('match_type', 'not in',
294+ ('storno', 'payment', 'payment_manual'))]}" />
295+ </group>
296 </xpath>
297 <field name="move_line_id" position="after">
298- <field name='payment_order_id'
299- attrs="{'readonly': [('match_multi', '=', False)],
300- 'invisible': [('match_type', 'not in',
301- ('payment_order', 'payment_order_manual'))]
302- }"
303- domain="[('id', 'in', payment_order_ids[0][2])]"
304- />
305- </field>
306- <field name="manual_move_line_ids" position="after">
307- <field name="manual_payment_line_id"/>
308- <field name="manual_payment_order_id"/>
309- </field>
310+ <group>
311+ <field name='payment_order_id'
312+ attrs="{'readonly': [('match_multi', '=', False)],
313+ 'invisible': [('match_type', 'not in',
314+ ('payment_order', 'payment_order_manual'))]}"
315+ domain="[('id', 'in', payment_order_ids[0][2])]" />
316+ </group>
317+ </field>
318+ <page string="Manual match" position="after">
319+ <page string="Match Payments">
320+ <separator string="Match this payment line" colspan="4"/>
321+ <field name="manual_payment_line_id"/>
322+ <separator string="Match this payment order" colspan="4"/>
323+ <field name="manual_payment_order_id"/>
324+ </page>
325+ </page>
326 </field>
327 </record>
328 </data>

Subscribers

People subscribed via source and target branches

to status/vote changes: