Saturday, December 28, 2024
1 change · saas-17.2
Miscellaneous changes
### Steps to reproduce: - Install "l10n_mx" and switch to a Mexican company - Create an invoice with a Mexican partner and confirm - Create a Payment - In the invoice form view, go to the "CFDI" page - Click "Update CFDI" - The payment appears, click on "Show" - The button "Request Cancel" does nothing ### Cause: the method `button_request_cancel` on move is called from the payment model but does not return anything: ``` def button_request_cancel(self): self.move_id.button_requ
Original PR description
### Steps to reproduce:
- Install "l10n_mx" and switch to a Mexican company
- Create an invoice with a Mexican partner and confirm
- Create a Payment
- In the invoice form view, go to the "CFDI" page
- Click "Update CFDI"
- The payment appears, click on "Show"
- The button "Request Cancel" does nothing
### Cause:
the method `button_request_cancel` on move is called from the payment model but does not return anything:
```
def button_request_cancel(self):
self.move_id.button_request_cancel()
```
But the `button_request_cancel` from `l10n_mx_edi` is returning a wizard that is never caught.
### Solution:
When clicking the "Request cancel" button, the method `action_request_cancel` is called instead of `action_cancel` which will dispatch the request depending on the type of move being cancelled.
opw-4332483
Forward-Port-Of: odoo/enterprise#75714