From 25dc27874ef02746be474ff7e7d7a5c9df4f4c5f Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Fri, 11 Oct 2019 08:48:01 +0000 Subject: [PATCH] [FIX] account: type of entries created by reversals Only invoices/bills should create their equivalent credit notes when reversed (with tax tags coming from the related repartition lines), other kinds of journal entries should be reversed as misc entries, to negate them entirely in the accounting closes odoo/odoo#38547 X-original-commit: cdb3ccf811d69dbd18f196614f380349a1335c9f Signed-off-by: Quentin De Paoli (qdp) --- addons/account/models/account_move.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 4b8058a4b35..814ff25bc12 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1924,10 +1924,11 @@ class AccountMove(models.Model): reverse_type_map = { 'entry': 'entry', 'out_invoice': 'out_refund', + 'out_refund': 'entry', 'in_invoice': 'in_refund', - 'in_refund': 'in_invoice', - 'out_receipt': 'in_receipt', - 'in_receipt': 'out_receipt', + 'in_refund': 'entry', + 'out_receipt': 'entry', + 'in_receipt': 'entry', } move_vals_list = []