OCA / l10n-spain

Odoo Spain Localization
https://www.aeodoo.org/estado-localizacion
GNU Affero General Public License v3.0
292 stars 520 forks source link

[16.0] l10n_es_aeat_sii_oca: create reversal from model other than account.move #3610

Closed mde-scopea closed 6 months ago

mde-scopea commented 6 months ago

Module

l10n_es_aeat_sii_oca

Describe the bug

When I try to create a reversal from an other model, this module try to open an invoice with the active_id which is the id of the current model and not an account.move id

To Reproduce

Affected versions: 16.0

Steps to reproduce the behavior: _Bug is identified with an OE module: helpdeskaccount 1.From a helpdesk.ticket, a button 'Refund' is added, which calls the wizard account.move.reversal

Result: Access Error: Due to security restrictions, you are not allowed to access 'Journal Entry' (account.move) records.... Trying to open an account.move with the id of the current helpdesk.ticket

Expected behavior Only call the specific process when coming from account.move model

mde-scopea commented 6 months ago

Fixed with PR #3609

pedrobaeza commented 6 months ago

Closing the issue as there's a PR. Next time, you only need to put the PR explaining the issue there.