From a7c5f12504209b6f2b022dcbd525253e4cd13172 Mon Sep 17 00:00:00 2001 From: "Bharat (OpenERP)" Date: Wed, 30 Nov 2011 12:57:59 +0530 Subject: [PATCH] [FIX] account : Account voucher: Analytic account associated with write off entries while payment does not consider lp bug: https://launchpad.net/bugs/893977 fixed bzr revid: bde@tinyerp.com-20111130072759-n1oqq2dg2l3j313k --- addons/account_voucher/account_voucher.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index fd6dac9f90d..a0d2b4660cb 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -935,6 +935,7 @@ class account_voucher(osv.osv): move_line = {} voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context) + analytic_id = voucher_brw.analytic_id.id or False current_currency_obj = voucher_brw.currency_id or voucher_brw.journal_id.company_id.currency_id if not currency_obj.is_zero(cr, uid, current_currency_obj, line_total): @@ -958,6 +959,7 @@ class account_voucher(osv.osv): 'debit': diff < 0 and -diff or 0.0, 'amount_currency': company_currency <> current_currency and voucher_brw.writeoff_amount or False, 'currency_id': company_currency <> current_currency and current_currency or False, + 'analytic_account_id': analytic_id } return move_line