Files
Odoo-18.0-20251222/sale_credit_note_reversal/models/account_move.py
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

18 lines
640 B
Python

# Copyright 2024 ForgeFlow (http://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import models
class AccountMove(models.Model):
_inherit = "account.move"
def _reverse_moves(self, default_values_list=None, cancel=False):
reversed_moves = super()._reverse_moves(
default_values_list=default_values_list, cancel=cancel
)
for move in reversed_moves:
if move.reversed_entry_id.move_type == "out_refund":
# convert from entry to out_invoice
move.move_type = "out_invoice"
return reversed_moves