diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index f3ce59f7b0b..ba9fe23759e 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -98,6 +98,10 @@ class account_statement_from_invoice_lines(osv.osv_memory): if voucher_line_dict: voucher_line_dict.update({'voucher_id': voucher_id}) voucher_line_obj.create(cr, uid, voucher_line_dict, context=context) + + amount_res = voucher_line_dict['amount_unreconciled'] + voucher_obj.write(cr, uid, voucher_id, {'amount':amount_res}, context=context) + if line.journal_id.type == 'sale': type = 'customer' elif line.journal_id.type == 'purchase': @@ -106,7 +110,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): type = 'general' statement_line_obj.create(cr, uid, { 'name': line.name or '?', - 'amount': amount, + 'amount': amount_res, 'type': type, 'partner_id': line.partner_id.id, 'account_id': line.account_id.id, diff --git a/addons/account_voucher/wizard/account_statement_from_invoice_view.xml b/addons/account_voucher/wizard/account_statement_from_invoice_view.xml index 1c0c00bd662..3213bae29e3 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice_view.xml +++ b/addons/account_voucher/wizard/account_statement_from_invoice_view.xml @@ -38,7 +38,7 @@