Tuesday, April 16, 2024
27 changes
Resolved issues and error corrections
This fix prevents database constraint records from being accidentally deleted when modules are loaded. The system now properly preserves existing constraint data that was previously being removed due to a technical oversight in how constraints are tracked during the module loading process.
Original PR description
When we load a module and the SQL constraints exist both in the table and in `ir_model_constraint` we need to ensure the xmlid is loaded. Otherwise the record in `ir_model_constraint` is removed. Since 4c9968397b0714bc90a9c94c4673bd3148db4010 we skip returning existing non-updated constraint records in `_reflect_constraint`. This leads to them being removed by the ORM. At the end of the load the ORM sees the record in `ir_model_data` but not in the xmlid pool, thus it removes it. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161893
This fix resolves an error that occurred when customers selected a Mondial Relay pickup location during checkout and then reloaded the page. The system was incorrectly trying to validate mandatory fields (like phone number) on Mondial Relay addresses, which cannot be edited. The fix removes this validation check for Mondial Relay partners, allowing customers to complete their checkout process without errors.
Original PR description
Steps to reproduce: 1) Set up mondial relay and publish it 2) Go to /shop, add a product and checkout 3) Choose a pickup location of mondial relay 4) Reload the page 5) Observe an error 'You cannot edit the address of a Point Relais' Reason: a partner was created without mandatory field 'phone` for the shipping address Solution: do not check mandatory fields for mondial relay partners as it is not allowed to edit them