Use accounting date instead of invoice date

For the analytic lines generated out of invoice lines use the accounting
date instead of the invoice date.

issue3075
review728002
(transplanted from 0103490821cb72dd23fe4c0821b756fa0ce22fe7)
This commit is contained in:
Marco Huymajer committed 2013-03-25 09:07:52 +01:00
1 parent 8e98dc44e4
commit 6848590a8d
1 file changed
+2 -1
+2 -1
View File
@@ -206,7 +206,8 @@ class InvoiceLine(ModelSQL, ModelView):
vals['credit'] = value['credit']
vals['account'] = account.id
vals['journal'] = line.invoice.journal.id
vals['date'] = line.invoice.invoice_date
vals['date'] = (line.invoice.accounting_date
or line.invoice.invoice_date)
vals['reference'] = line.invoice.reference
vals['party'] = line.invoice.party.id
value['analytic_lines'].append(('create', vals))