Skip to content
Snippets Groups Projects
Commit faa04a43 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] account_voucher: import invoices, sign according to transaction type

parent 1f5c6f16
No related branches found
No related tags found
No related merge requests found
......@@ -78,10 +78,11 @@ class account_statement_from_invoice_lines(osv.osv_memory):
'invoice_id': line.invoice.id})
type = 'general'
ttype = amount < 0 and 'payment' or 'receipt'
sign = 1
sign = 1 if ttype == 'receipt' else -1
if line.journal_id.type in ('sale', 'sale_refund'):
type = 'customer'
ttype = 'receipt'
sign = 1
elif line.journal_id.type in ('purchase', 'purchase_refund'):
type = 'supplier'
ttype = 'payment'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment