diff --git a/account_easy_reconcile/base_reconciliation.py b/account_easy_reconcile/base_reconciliation.py
index b50c06b9..b5b40542 100644
--- a/account_easy_reconcile/base_reconciliation.py
+++ b/account_easy_reconcile/base_reconciliation.py
@@ -188,6 +188,9 @@ class easy_reconcile_base(orm.AbstractModel):
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,
diff --git a/account_easy_reconcile/easy_reconcile.py b/account_easy_reconcile/easy_reconcile.py
index dfe74da7..fd5e4848 100644
--- a/account_easy_reconcile/easy_reconcile.py
+++ b/account_easy_reconcile/easy_reconcile.py
@@ -57,6 +57,9 @@ class easy_reconcile_options(orm.AbstractModel):
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 = {
@@ -199,6 +202,8 @@ class account_easy_reconcile(orm.Model):
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,
diff --git a/account_easy_reconcile/easy_reconcile.xml b/account_easy_reconcile/easy_reconcile.xml
index 00771b73..1fb27a10 100644
--- a/account_easy_reconcile/easy_reconcile.xml
+++ b/account_easy_reconcile/easy_reconcile.xml
@@ -130,6 +130,7 @@ The lines should have the same amount (with the write-off) and the same referenc
+
@@ -147,6 +148,7 @@ The lines should have the same amount (with the write-off) and the same referenc
+