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 277a4939ee
commit 1e4cb777cb
1 file changed
+2 -1
+2 -1
View File
@@ -191,7 +191,8 @@ class InvoiceLine:
vals['credit'] = value['credit']
vals['account'] = account.id
vals['journal'] = self.invoice.journal.id
vals['date'] = self.invoice.invoice_date
vals['date'] = (self.invoice.accounting_date
or self.invoice.invoice_date)
vals['reference'] = self.invoice.reference
vals['party'] = self.invoice.party.id
value['analytic_lines'].append(('create', vals))