← Back to team overview

banking-addons-team team mailing list archive

lp:~akretion-team/banking-addons/bank-statement-reconcile-61-internal-account into lp:banking-addons/bank-statement-reconcile-61

 

Benoit Guillot - http://www.akretion.com has proposed merging lp:~akretion-team/banking-addons/bank-statement-reconcile-61-internal-account into lp:banking-addons/bank-statement-reconcile-61.

Requested reviews:
  Banking Addons Team (banking-addons-team)

For more details, see:
https://code.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-61-internal-account/+merge/158877

This proposal fix a name of a class and add a field in the class account_statement_profile.
With this field : internal_account_transfer_id, you can define a default account on the profile for the internal transfers. For instance from your paypal account to your main bank account. 

Sorry for the diff, my IDE also automaticaly remove space at the end of the lines.
-- 
https://code.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-61-internal-account/+merge/158877
Your team Banking Addons Team is requested to review the proposed merge of lp:~akretion-team/banking-addons/bank-statement-reconcile-61-internal-account into lp:banking-addons/bank-statement-reconcile-61.
=== modified file 'account_statement_ext/statement.py'
--- account_statement_ext/statement.py	2012-10-25 07:38:31 +0000
+++ account_statement_ext/statement.py	2013-04-15 10:18:27 +0000
@@ -66,6 +66,10 @@
                                                     ),
         'bank_statement_prefix': fields.char('Bank Statement Prefix', size=32),
         'bank_statement_ids': fields.one2many('account.bank.statement', 'profile_id', 'Bank Statement Imported'),
+        'internal_account_transfer_id': fields.many2one('account.account',
+                                'Internal Account Transfer',
+                                help="Choose the default account for internal\
+                                bank transfer")
         
         
     }
@@ -81,7 +85,7 @@
     ]
 
 
-class AccountBankSatement(Model):
+class AccountBankStatement(Model):
     """
     We improve the bank statement class mostly for : 
     - Removing the period and compute it from the date of each line. 
@@ -132,7 +136,7 @@
             profile_obj = self.pool.get('account.statement.profile')
             profile = profile_obj.browse(cr,uid,vals['profile_id'],context)
             vals['journal_id'] = profile.journal_id.id
-        return super(AccountBankSatement, self).create(cr, uid, vals, context=context)
+        return super(AccountBankStatement, self).create(cr, uid, vals, context=context)
     
     def _get_period(self, cursor, uid, date, context=None):
         """
@@ -476,7 +480,7 @@
         """
         st = self.browse(cr, uid, st_id, context=context)
         if st.balance_check:
-            return super(AccountBankSatement,self).balance_check(cr, uid, st_id, journal_type, context)
+            return super(AccountBankStatement,self).balance_check(cr, uid, st_id, journal_type, context)
         else:
             return True
 
@@ -499,7 +503,7 @@
                     }}
 
 
-class AccountBankSatementLine(Model):
+class AccountBankStatementLine(Model):
     """
     Override to compute the period from the date of the line, add a method to retrieve
     the values for a line from the profile. Override the on_change method to take care of 
@@ -625,7 +629,7 @@
         """
         if context is None:
             context = {}
-        res = super(AccountBankSatementLine,self).onchange_type(cr, uid, line_id, partner_id, type, context)
+        res = super(AccountBankStatementLine,self).onchange_type(cr, uid, line_id, partner_id, type, context)
         if 'account_id' in res['value']:
             result = self.get_values_for_line(cr, uid, profile_id = profile_id, 
                 partner_id = partner_id, line_type = type, context = context)

=== modified file 'account_statement_ext/statement_view.xml'
--- account_statement_ext/statement_view.xml	2012-08-02 12:46:12 +0000
+++ account_statement_ext/statement_view.xml	2013-04-15 10:18:27 +0000
@@ -26,7 +26,7 @@
                 </field>
             </field>
         </record>
-        
+
     <record id="statement_importer_view_form" model="ir.ui.view">
         <field name="name">account.statement.profile.view</field>
         <field name="model">account.statement.profile</field>
@@ -40,6 +40,7 @@
                 <field name="commission_account_id" />
                 <field name="commission_analytic_id" />
                 <field name="receivable_account_id" />
+                <field name="internal_account_transfer_id"/>
                 <field name="force_partner_on_bank"/>
                 <field name="balance_check"/>
                 <field name="bank_statement_prefix"/>
@@ -71,7 +72,7 @@
         <field name="view_mode">tree,form</field>
     </record>
 
-    <menuitem string="Bank Statements Profile" action="action_treasury_statement_profile_tree" id="menu_treasury_statement_profile_tree" parent="account.menu_configuration_misc" sequence="30"/>    
+    <menuitem string="Bank Statements Profile" action="action_treasury_statement_profile_tree" id="menu_treasury_statement_profile_tree" parent="account.menu_configuration_misc" sequence="30"/>
 
     <record model="ir.ui.view" id="id_in_statement_line">
         <field name="name">account.bank.statement.line.inherit</field>
@@ -84,8 +85,8 @@
                 </xpath>
         </field>
     </record>
-    
-    
+
+
     <record id="view_treasury_statement_search" model="ir.ui.view">
         <field name="name">account.bank.statement.search</field>
         <field name="model">account.bank.statement</field>
@@ -124,7 +125,7 @@
         </field>
     </record>
 
-    
+
     <record id="view_treasury_statement_form" model="ir.ui.view">
         <field name="name">account.bank.statement.form</field>
         <field name="model">account.bank.statement</field>
@@ -160,7 +161,7 @@
             <xpath expr="/form/group/field[@name='balance_end']" position="replace">
                  <field name="balance_end"/>
             </xpath>
-            
+
             <xpath expr="/form/group/field[@name='journal_id']" position="attributes">
                  <attribute name="widget"></attribute>
             </xpath>
@@ -191,18 +192,18 @@
             <xpath expr="/form/notebook/page/field/tree/field[@name='type']" position="replace">
                  <field name="type" on_change="onchange_type(partner_id, type, parent.profile_id)"/>
             </xpath>
-            
+
         </field>
     </record>
 
-    
+
         <act_window id="act_bank_statement_from_profile"
-            name="Open Statements" 
-            res_model="account.bank.statement" 
-            src_model="account.statement.profile" 
+            name="Open Statements"
+            res_model="account.bank.statement"
+            src_model="account.statement.profile"
             domain="[('profile_id','=',active_id),]"
             view_type="form"/>
-        
+
 
 </data>
 </openerp>


Follow ups