odoo/enterprise#79403

Created by Training, Louis Gobert (loug)
Closed
label
odoo-dev:18.0-l10n_mx_edi-fix-cancel-account-payment-loug
head
3b83d6c0ab80989791a9125d8b71d75d5fae1995
odoo/odoo odoo/enterprise
18.0 #198082 #79403
saas-18.1 #199469
saas-18.2 #199477
saas-18.3
master #199496

[FIX] l10n_mx_edi: cancel payment when move is canceled

Since Odoo 18.0, account.payment no longer inherits from account.move. As a result, canceling a payment with _l10n_mx_edi_cfdi_move_post_cancel does not automatically cancel the associated payment record.

Steps to reproduce:
1. Ensure the Mexican localization is installed and properly configured.
2. Generate an invoice and sign it with the government (CFDI).
3. Create and sign a payment for the invoice.
4. Cancel the payment from the CFDI table.

Current behavior:
- Odoo cancels the move, but the related payment remains posted.

Expected behavior:
- The payment should also be canceled when the move is canceled.

This fix ensures that the associated payment is canceled correctly.

opw-4528910