Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] l10n_es_aeat_sii_oca: Change registration key on FP change
Steps to reproduce: - Have partner 1 with fiscal position FP1 with registration key 01. - Have partner 2 with fiscal position FP2 with registration key 02. - Create customer invoice with partner 1 as customer. - Select partner 2 as delivery address. Expected result: Fiscal position is changed to FP2 and the registration key is changed to 02. Current behavior: The fiscal position is changed, but not the registration key. That's because the recursive onchanges are explicitly disabled in account move object: https://github.com/odoo/odoo/blob/2f817a7b36cc7e5ab235829eecd61a1d71ce546e/addons/account/models/account_move.py#L1190 We workaround this limitation converting the registration key into a computed writable field that is computed even if the recursive onchange is disabled.
- Loading branch information