49e6abe0b7ec2bd235b9d2cdde0b746024135095
Steps to reproduce: - Install Argentinian Electronic Payment (l10n_ar_edi) - Change company (ar responsable) - Go in Accounting > Settings: in the AFIP section - delete key and certificate - click on `generate request` -> the key is not persisted unless a manual refresh/discard is done Solution: In V14 the `onchange` is triggered. Why? Because this https://github.com/odoo/odoo/blob/1723c52d42389a8b5124ab4d15d55dad0d119a8f/addons/web/static/src/js/chrome/action_manager.js#L130-L139 works because of the call of the `on_close` function: https://github.com/odoo/odoo/blob/1723c52d42389a8b5124ab4d15d55dad0d119a8f/addons/web/static/src/js/chrome/action_manager.js#L534-L543 Why not in V15? In V15 the onchange can be triggered when the `this.reload` function is called via the `on_closed` function: https://github.com/odoo/odoo/blob/7ce6d8d70be79c9c626865598b898dce9a18b045/addons/web/static/src/legacy/js/views/basic/basic_controller.js#L472-L482 But to be triggered, in the `wrapSuccessOrFail` (when the `_trigger_up` funciton is called), the `onClose` must be called: https://github.com/odoo/odoo/blob/fb3878b581b831c13550d40e38a8e8890d82ea0d/addons/web/static/src/legacy/action_adapters.js#L362-L376 In order to do that, we would have to use the `options` (the `params`) sent with the `doActionButton` in the `doAction` function. https://github.com/odoo/odoo/blob/fee371be291ba3d6f1adc71c08420b6510fdf386/addons/web/static/src/webclient/actions/action_service.js#L1198-L1199 BUT the `options` are not used anymore when `_executeActURLAction`* is called (only the `action`paramater is required): https://github.com/odoo/odoo/blob/fee371be291ba3d6f1adc71c08420b6510fdf386/addons/web/static/src/webclient/actions/action_service.js#L1098-L1104 Therefore, we find ourselves in a situation in which we cannot call the `on_closed` function in (the `options` are not even an 'option'**): https://github.com/odoo/odoo/blob/fee371be291ba3d6f1adc71c08420b6510fdf386/addons/web/static/src/webclient/actions/action_service.js#L748-L764 Look again in V14 how the function is called: https://github.com/odoo/odoo/blob/1723c52d42389a8b5124ab4d15d55dad0d119a8f/addons/web/static/src/js/chrome/action_manager.js#L527-L543 The solution is therefore easily understandable. *we are in this specific switch_case because the action executed is https://github.com/odoo/enterprise/blob/6805d2f591237ad17d7db827dcf6fe36c2c2744f/l10n_ar_edi/models/res_config_settings.py#L32 ** no pun intended OPW-2680841 closes odoo/odoo#81881 X-original-commit: cb9dfe107d073aeaf4a6b72818b4c28b11dab0c7 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%