From f9d25973d08c2bf27049d606efaee955cf7386ed Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 7 May 2015 13:52:21 +0200 Subject: [PATCH] [FIX] account: create statement from invoice line uses statement date instead of today's date Using statement date is necessary in order to select the appropriate currency rate. opw-634297 --- addons/account_voucher/wizard/account_statement_from_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index 362cb516e7c..ba5243e420e 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -51,8 +51,8 @@ class account_statement_from_invoice_lines(osv.osv_memory): currency_obj = self.pool.get('res.currency') voucher_obj = self.pool.get('account.voucher') voucher_line_obj = self.pool.get('account.voucher.line') - line_date = time.strftime('%Y-%m-%d') statement = statement_obj.browse(cr, uid, statement_id, context=context) + line_date = statement.date # for each selected move lines for line in line_obj.browse(cr, uid, line_ids, context=context):