← Back to team overview

banking-addons-team team mailing list archive

[Merge] lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-account_easy_reconcile-analytic-account into lp:banking-addons/bank-statement-reconcile-7.0

 

Guewen Baconnier @ Camptocamp has proposed merging lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-account_easy_reconcile-analytic-account into lp:banking-addons/bank-statement-reconcile-7.0.

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

For more details, see:
https://code.launchpad.net/~camptocamp/banking-addons/bank-statement-reconcile-7.0-account_easy_reconcile-analytic-account/+merge/213007

Allow to set an analytic account on write-off entries created during reconciliations.
-- 
https://code.launchpad.net/~camptocamp/banking-addons/bank-statement-reconcile-7.0-account_easy_reconcile-analytic-account/+merge/213007
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-account_easy_reconcile-analytic-account into lp:banking-addons/bank-statement-reconcile-7.0.
=== modified file 'account_easy_reconcile/base_reconciliation.py'
--- account_easy_reconcile/base_reconciliation.py	2013-01-04 08:39:10 +0000
+++ account_easy_reconcile/base_reconciliation.py	2014-03-27 09:26:20 +0000
@@ -188,6 +188,9 @@
             period_id = self.pool.get('account.period').find(
                 cr, uid, dt=date, context=context)[0]
 
+            if rec.analytic_account_id:
+                rec_ctx['analytic_id'] = rec.analytic_account_id.id
+
             ml_obj.reconcile(
                 cr, uid,
                 line_ids,

=== modified file 'account_easy_reconcile/easy_reconcile.py'
--- account_easy_reconcile/easy_reconcile.py	2013-02-13 15:54:48 +0000
+++ account_easy_reconcile/easy_reconcile.py	2014-03-27 09:26:20 +0000
@@ -56,6 +56,9 @@
                 required=True,
                 string='Date of reconciliation'),
             'filter': fields.char('Filter', size=128),
+            'analytic_account_id': fields.many2one(
+                'account.analytic.account', 'Analytic Account',
+                help="Analytic account for the write-off"),
     }
 
     _defaults = {
@@ -198,6 +201,8 @@
                                     rec_method.account_lost_id.id),
                 'account_profit_id': (rec_method.account_profit_id and
                                       rec_method.account_profit_id.id),
+                'analytic_account_id': (rec_method.analytic_account_id and
+                                        rec_method.analytic_account_id.id),
                 'journal_id': (rec_method.journal_id and
                                rec_method.journal_id.id),
                 'date_base_on': rec_method.date_base_on,

=== modified file 'account_easy_reconcile/easy_reconcile.xml'
--- account_easy_reconcile/easy_reconcile.xml	2013-02-13 15:54:48 +0000
+++ account_easy_reconcile/easy_reconcile.xml	2014-03-27 09:26:20 +0000
@@ -124,6 +124,7 @@
                 <field name="account_lost_id" attrs="{'required':[('write_off','>',0)]}"/>
                 <field name="account_profit_id" attrs="{'required':[('write_off','>',0)]}"/>
                 <field name="journal_id" attrs="{'required':[('write_off','>',0)]}"/>
+                <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
                 <field name="date_base_on"/>
             </form>
         </field>
@@ -141,6 +142,7 @@
                 <field name="account_lost_id" attrs="{'required':[('write_off','>',0)]}"/>
                 <field name="account_profit_id" attrs="{'required':[('write_off','>',0)]}"/>
                 <field name="journal_id" attrs="{'required':[('write_off','>',0)]}"/>
+                <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
                 <field name="date_base_on"/>
             </tree>
         </field>


Follow ups