From da6e1fcc6b6bea2a7e6c58d55a31c12e8135c575 Mon Sep 17 00:00:00 2001 From: Niels Huylebroeck Date: Wed, 8 May 2013 18:09:10 +0200 Subject: [PATCH] [FIX] account_voucher: when importing invoices the payment date should be set to the statement date instead of being set to the original invoice date lp bug: https://launchpad.net/bugs/1127198 fixed bzr revid: nh@agaplan.eu-20130508160910-xk1pljvn1aco8417 --- .../account_voucher/wizard/account_statement_from_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index fce251df175..289a110fdbd 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -94,7 +94,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): 'account_id': result['value'].get('account_id', statement.journal_id.default_credit_account_id.id), 'company_id': statement.company_id.id, 'currency_id': statement.currency.id, - 'date': line.date, + 'date': statement.date, 'amount': sign*amount, 'payment_rate': result['value']['payment_rate'], 'payment_rate_currency_id': result['value']['payment_rate_currency_id'], @@ -119,7 +119,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): 'statement_id': statement_id, 'ref': line.ref, 'voucher_id': voucher_id, - 'date': time.strftime('%Y-%m-%d'), + 'date': statement.date, }, context=context) return {'type': 'ir.actions.act_window_close'}