← Back to team overview

banking-addons-team team mailing list archive

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

 

Ruchir Shukla(BizzAppDev) has proposed merging lp:~ruchir.shukla/banking-addons/new-banking-ui-improvment into lp:banking-addons.

Requested reviews:
  Banking Addons Core Editors (banking-addons-team)

For more details, see:
https://code.launchpad.net/~ruchir.shukla/banking-addons/new-banking-ui-improvment/+merge/199025

Bank Transaction UI improvement 
-- 
https://code.launchpad.net/~ruchir.shukla/banking-addons/new-banking-ui-improvment/+merge/199025
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~ruchir.shukla/banking-addons/new-banking-ui-improvment into lp:banking-addons.
=== modified file 'account_banking/__openerp__.py'
--- account_banking/__openerp__.py	2013-05-01 14:25:04 +0000
+++ account_banking/__openerp__.py	2013-12-14 10:24:24 +0000
@@ -106,4 +106,5 @@
         recognized and made available at server (re)start.
     ''',
     'installable': True,
+    'auto_install': False,
 }

=== modified file 'account_banking/account_banking.py'
--- account_banking/account_banking.py	2013-10-14 12:33:26 +0000
+++ account_banking/account_banking.py	2013-12-14 10:24:24 +0000
@@ -247,6 +247,7 @@
         'file': fields.binary('Raw Data', readonly=True,
                               states={'draft': [('readonly', False)]}
                              ),
+        'file_name': fields.char('File name', size=256),
         'log': fields.text('Import Log', readonly=True,
                            states={'draft': [('readonly', False)]}
                           ),

=== modified file 'account_banking/account_banking_view.xml'
--- account_banking/account_banking_view.xml	2013-06-04 10:18:31 +0000
+++ account_banking/account_banking_view.xml	2013-12-14 10:24:24 +0000
@@ -16,7 +16,10 @@
             id="account_banking.menu_finance_banking_settings"
             parent="account.menu_finance_configuration"
             />
-
+        <menuitem action="account.action_view_bank_statement_tree"
+            id="account.journal_cash_move_lines"
+            sequence="18"
+            parent="account.menu_finance_bank_and_cash"/>
         <!-- Add a shortcut menu for bank accounts -->
         <record model="ir.actions.act_window" id="action_account_banking_res_partner_banks">
             <field name="name">Bank Accounts</field>
@@ -105,7 +108,8 @@
                             <field name="date" />
                             <field name="user_id" />
                             <field name="state" />
-                            <field name="file"/>
+                            <field name="file" filename="file_name"/>
+                            <field name="file_name" invisible="1"/>
                             <field name="format" />
                         </page>
                         <page string="Statements">
@@ -142,17 +146,17 @@
         <!-- Add a menu item for it -->
         <menuitem name="Imported Bank Statements Files"
             id="menu_action_account_banking_imported_files"
-            parent="account_banking.menu_finance_banking_actions"
+            parent="account.menu_finance_bank_and_cash"
             action="action_account_banking_imported_files"
-            sequence="12"
+            sequence="15"
          />
 
         <!-- Add the import wizard to the menu -->
         <menuitem name="Import Bank Statements File"
             id="menu_account_banking_import_wizard"
-            parent="account_banking.menu_finance_banking_actions"
+            parent="account.menu_finance_bank_and_cash"
             action="wizard_account_banking_import_file"
-            sequence="15"/>
+            sequence="12"/>
 
         <!-- Add the import wizard to the statement's right menu -->
         <act_window name="Import Bank Statements File"

=== modified file 'account_banking/wizard/bank_import.py'
--- account_banking/wizard/bank_import.py	2013-05-28 14:08:18 +0000
+++ account_banking/wizard/bank_import.py	2013-12-14 10:24:24 +0000
@@ -140,6 +140,7 @@
         import_id = statement_file_obj.create(cr, uid, dict(
             company_id = company.id,
             file = statements_file,
+            file_name = banking_import.file_name,
             state = 'unfinished',
             format = parser.name,
         ))
@@ -353,7 +354,7 @@
             '%s: %s' % (_('Number of bank costs invoices created'),
                         results.bank_costs_invoice_cnt),
             '',
-            '%s:' % ('Error report'),
+            '%s:' % (_('Error report')),
             '',
         ]
         text_log = '\n'.join(report + results.log)
@@ -390,6 +391,7 @@
                 'error': [('readonly', True)],
                 },
             ),
+        'file_name': fields.char('File name', size=256),
         'file': fields.binary(
             'Statements File', required=True,
             help = ('The Transactions File to import. Please note that while it is '

=== modified file 'account_banking/wizard/bank_import_view.xml'
--- account_banking/wizard/bank_import_view.xml	2013-05-28 15:18:26 +0000
+++ account_banking/wizard/bank_import_view.xml	2013-12-14 10:24:24 +0000
@@ -5,15 +5,16 @@
             <field name="name">account.banking.bank.import</field>
             <field name="model">account.banking.bank.import</field>
             <field name="arch" type="xml">
-		<form string="Import Bank Transactions File">
-		    <group colspan="4" states="init,ready,error">
-			<separator colspan="4" string="Select the processing details:"/>
-			<field name="company" colspan="1"/>
-			<field name="file"/>
-			<newline />
-			<field name="parser"/>
-			<field name="state" invisible="1"/>
-		    </group>
+		        <form string="Import Bank Transactions File"  version="7.0">
+		            <group colspan="4" states="init,ready,error">
+			            <separator colspan="4" string="Select the processing details:"/>
+			            <field name="company" colspan="1"/>
+			            <field name="file" filename="file_name"/>
+			            <field name="file_name" invisible="1"/>
+			            <newline />
+			            <field name="parser"/>
+			            <field name="state" invisible="1"/>
+		            </group>
                     <notebook colspan="4">
                         <page attrs="{'invisible': [('state', '!=', 'review')]}" string="Transactions">
                             <field name="line_ids" colspan="4" nolabel="1">
@@ -37,16 +38,16 @@
                                    attrs="{'invisible': [('state', '!=', 'ready')]}" />
                         </page>
                     </notebook>
-		    <group colspan="2" >
-			<button icon="gtk-cancel"
-				special="cancel"
-                                states="init"
-				string="Cancel"/>
-			<button icon="gtk-ok"
-				string="Import"
-                                states="init" 
-				name="import_statements_file"
-				type="object"/>
+                    <footer>
+                        <div attrs="{'invisible': [('state', '!=', 'init')]}">
+                            <button string="Import" class="oe_highlight"
+                                states="init" name="import_statements_file"
+				                type="object"/>
+				             or
+			                <button class="oe_link" special="cancel"
+                                states="init" string="Cancel"/>
+                        </div>
+                        
                         <button icon="gtk-close"
                                 special="cancel"
                                 string="Close"
@@ -61,7 +62,7 @@
                                 type="object" 
                                 string="Confirm"
                                 states="review"/>
-		    </group>
+                    </footer>
 		</form>
 	    </field>
         </record>

=== modified file 'account_banking/wizard/banking_transaction_wizard.xml'
--- account_banking/wizard/banking_transaction_wizard.xml	2013-08-12 09:20:12 +0000
+++ account_banking/wizard/banking_transaction_wizard.xml	2013-12-14 10:24:24 +0000
@@ -5,7 +5,7 @@
             <field name="name">transaction.wizard.first</field>
             <field name="model">banking.transaction.wizard</field>
             <field name="arch" type="xml">
-                <form string="Match transaction">
+                <form string="Match transaction"  version="7.0">
                     <!-- fields used for form logic -->
                     <field name="statement_line_parent_id" invisible="True"/>
                     <field name="invoice_ids" invisible="True"/>
@@ -36,22 +36,25 @@
                                 <separator string="Multiple matches" colspan="2"/>
                                 <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." />
                             </group>
-                            <group attrs="{'readonly': [('match_multi', '!=', True)]}" col="8">
+                            </group>
+                            </group>
+                            <group>
+                            <newline/>
                                 <!-- show if we have an invoice type match (but the user may need to select from multiple options)
                                      or whenever there is an invoice_id (e.g. in case of a manual match) 
                                 -->
                                 <field name='invoice_id'
-                                       attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'invoice'),('invoice_id', '=', False)]}"
+                                       attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'invoice'),('invoice_id', '=', False)]}" colspan="2"
                                        domain="[('id', 'in', invoice_ids[0][2])]"
                                        />
                                 <!-- show if we have a move type match or a manual match without an invoice_id
                                 -->
                                 <field name='move_line_id'
-                                       attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'move'),('invoice_id', '=', False)]}"
+                                       attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'move'),('invoice_id', '=', False)]}" colspan="2"
                                        domain="[('id', 'in', move_line_ids[0][2])]"
                                        />
-                                <field name='analytic_account_id' />
-                            </group>
+                             <newline/>
+                            <field colspan="2" name='analytic_account_id' />
                             <button colspan="1"
                                     name="trigger_write"
                                     type="object"
@@ -85,9 +88,11 @@
                             </page>
                             <!-- Manual selection -->
                             <page string="Manual match">
+                                <separator string="Match one or more invoices" colspan="4"/>
                                 <field name="manual_invoice_ids" colspan="4"
                                        context="{'search_default_partner_id': partner_id}"
                                        />
+                                <separator string="Or match one or more entries" colspan="4"/>
                                 <field name="manual_move_line_ids" colspan="4"
                                        context="{'search_default_partner_id': partner_id}"
                                        />
@@ -118,11 +123,10 @@
                                 </group>
                             </page>
                         </notebook>
-                        <group colspan="2">
-                            <separator/>
+                        <footer>
                             <button icon="gtk-ok" string="Close" special="cancel"/>
-                        </group>
-                    </group>
+                        </footer>
+                    
                 </form>
             </field>
         </record>

=== modified file 'account_banking/wizard/link_partner.xml'
--- account_banking/wizard/link_partner.xml	2013-06-05 12:34:24 +0000
+++ account_banking/wizard/link_partner.xml	2013-12-14 10:24:24 +0000
@@ -6,7 +6,7 @@
             <field name="type">form</field>
             <field name="model">banking.link_partner</field>
             <field name="arch" type="xml">
-                <form string="Link partner">
+                <form string="Link partner" version="7.0" >
                     <group colspan="4" col="6" string="Transaction data">
                         <field name="ref" />
                         <field name="amount" />
@@ -40,15 +40,20 @@
                             <field name="email" widget="email"/>
                         </group>
                     </group>
-                    <button icon="gtk-cancel" string="Cancel" special="cancel" />
-                    <button icon="gtk-ok" string="Create partner"
-                            name="link_partner" type="object"
-                            attrs="{'invisible': [('partner_id', '!=', False)]}"
-                            />
-                    <button icon="gtk-ok" string="Link existing partner"
-                            name="link_partner" type="object"
-                            attrs="{'invisible': [('partner_id', '==', False)]}"
-                            />
+                    <footer>
+                        <button string="Create partner"
+                                name="link_partner" type="object"
+                                class="oe_highlight"
+                                attrs="{'invisible': [('partner_id', '!=', False)]}"
+                                />
+                        <button string="Link existing partner"
+                                class="oe_highlight"
+                                name="link_partner" type="object"
+                                attrs="{'invisible': [('partner_id', '==', False)]}"
+                                />
+                         or
+                        <button class="oe_link" string="Cancel" special="cancel" />
+                    </footer>
                 </form>
             </field>
         </record>

=== modified file 'account_banking_payment/view/banking_transaction_wizard.xml'
--- account_banking_payment/view/banking_transaction_wizard.xml	2013-08-12 09:20:35 +0000
+++ account_banking_payment/view/banking_transaction_wizard.xml	2013-12-14 10:24:24 +0000
@@ -12,24 +12,29 @@
                 </field>
                 <xpath expr="//group/separator[@string='Multiple matches']/.."
                        position="after">
-                    <field name='payment_line_id'
-                           attrs="{'invisible': [('match_type', 'not in', 
-                                       ('storno', 'payment', 'payment_manual'))]}"
-                           />
+                       <group>
+                           <field name='payment_line_id'
+                               attrs="{'invisible': [('match_type', 'not in',
+                               ('storno', 'payment', 'payment_manual'))]}" />
+                       </group>
                 </xpath>
                 <field name="move_line_id" position="after">
-                    <field name='payment_order_id'
-                           attrs="{'readonly': [('match_multi', '=', False)],
-                                   'invisible': [('match_type', 'not in', 
-                                       ('payment_order', 'payment_order_manual'))]
-                                  }"
-                           domain="[('id', 'in', payment_order_ids[0][2])]"
-                           />
-                </field>
-                <field name="manual_move_line_ids" position="after">
-                    <field name="manual_payment_line_id"/>
-                    <field name="manual_payment_order_id"/>
-                </field>
+                    <group>
+                        <field name='payment_order_id'
+                            attrs="{'readonly': [('match_multi', '=', False)],
+                            'invisible': [('match_type', 'not in',
+                            ('payment_order', 'payment_order_manual'))]}"
+                            domain="[('id', 'in', payment_order_ids[0][2])]" />
+                    </group>
+                </field>
+                <page string="Manual match" position="after">
+                    <page string="Match Payments">
+                        <separator string="Match this payment line" colspan="4"/>
+                        <field name="manual_payment_line_id"/>
+                        <separator string="Match this payment order" colspan="4"/>
+                        <field name="manual_payment_order_id"/>
+                    </page>
+                </page>
             </field>
         </record>
     </data>


Follow ups