[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
This commit is contained in:
Nicolas Martinelli 2015-05-07 13:52:21 +02:00
parent f300d648a8
commit f9d25973d0
1 changed files with 1 additions and 1 deletions

View File

@ -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):