From fbccb0d6d521d233caf19e956553f7dcda1f42ff Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Fri, 17 Sep 2010 14:38:28 +0530 Subject: [PATCH] [FIX] Account: Cash statement => creation of analytic lines from cash statement now with creation of account.move.line so removed the code to manually create analytic lines bzr revid: mra@mra-laptop-20100917090828-yvulxc6lmrci9s57 --- addons/account/account_cash_statement.py | 38 ++++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 8cdb20aa225..c87b3bf2f80 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -454,25 +454,25 @@ class account_cash_statement(osv.osv): move_line_id = account_move_line_obj.create(cr, uid, val , context=context) torec.append(move_line_id) - if move.analytic_account_id: - anal_val = {} - amt = (val['credit'] or 0.0) - (val['debit'] or 0.0) - anal_val = { - 'name': val['name'], - 'ref': val['ref'], - 'date': val['date'], - 'amount': amt, - 'account_id': val['analytic_account_id'], - 'currency_id': val['currency_id'], - 'general_account_id': val['account_id'], - 'journal_id': st.journal_id.analytic_journal_id.id, - 'period_id': val['period_id'], - 'user_id': uid, - 'move_id': move_line_id - } - if val.get('amount_currency', False): - anal_val['amount_currency'] = val['amount_currency'] - account_analytic_line_obj.create(cr, uid, anal_val, context=context) +# if move.analytic_account_id: +# anal_val = {} +# amt = (val['credit'] or 0.0) - (val['debit'] or 0.0) +# anal_val = { +# 'name': val['name'], +# 'ref': val['ref'], +# 'date': val['date'], +# 'amount': amt, +# 'account_id': val['analytic_account_id'], +# 'currency_id': val['currency_id'], +# 'general_account_id': val['account_id'], +# 'journal_id': st.journal_id.analytic_journal_id.id, +# 'period_id': val['period_id'], +# 'user_id': uid, +# 'move_id': move_line_id +# } +# if val.get('amount_currency', False): +# anal_val['amount_currency'] = val['amount_currency'] +# account_analytic_line_obj.create(cr, uid, anal_val, context=context) if move.reconcile_id and move.reconcile_id.line_new_ids: for newline in move.reconcile_id.line_new_ids: