Friday, January 28, 2022
2 changes · master
Resolved issues and error corrections
Odoo now blocks attempts to reuse an existing external identifier for a different type of record. This prevents updates from accidentally overwriting unrelated business or system records, improving data integrity during module updates or upgrades.
Original PR description
Before this commit, changing the model on an existing xml-id may lead to strange results. create any record in xml, ie: xml_id=my_xml_id, model=new_model => Odoo will create a new external_id, pointing to (new_model, id=1) change only the model in the xml, ie: xml_id=my_xml_id, model=ir.cron => Odoo will use the id of the existing external_id with the new model and points now to (ir.cron, id=1) AND REPLACE the ir.cron id=1 (autovacuum_job) with the data of the xml. This commit simply prevent that by raising when trying to recycle the same xmlid for another model. An explicit upgrade script to remove the existing xmlid and corresponding records should be write.
Fixes an issue in the Sign app where an error dialog could fail to reload the page as intended. Users who encounter this dialog should now be able to continue with the expected page refresh instead of seeing a browser error.
Original PR description
In sign, when passing window.location.reload as the callback to the openErrorDialog method, an illegal invocation error was happening. This commit adds a wrapper function to it that prevents the error and correctly reloads the page.