From 8f71f772c76d9b8e2bfd5fb85f78552a516800c4 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 7 Jan 2020 08:39:10 +0000 Subject: [PATCH] [FIX] account: incorrect Payment Reference - Create a customer invoice. - Validate it. - A payment reference (`invoice_payment_ref`) is given. - Refund with option 'Full refund and new draft invoice' The `invoice_payment_ref` field is kept on the draft invoice, while we want a new reference since it is a new invoice. opw-2159166 closes odoo/odoo#42832 X-original-commit: 77c28421e6c7711e3d3c39dbece4e2bfa0b26b5c Signed-off-by: Nicolas Martinelli (nim) --- addons/account/wizard/account_move_reversal.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/account/wizard/account_move_reversal.py b/addons/account/wizard/account_move_reversal.py index 67683ac44b5..48597fe61f1 100644 --- a/addons/account/wizard/account_move_reversal.py +++ b/addons/account/wizard/account_move_reversal.py @@ -73,7 +73,6 @@ class AccountMoveReversal(models.TransientModel): moves_vals_list = [] for move in moves.with_context(include_business_fields=True): moves_vals_list.append(move.copy_data({ - 'invoice_payment_ref': move.name, 'date': self.date or move.date, })[0]) new_moves = self.env['account.move'].create(moves_vals_list)