Saturday, July 16, 2022
4 changes · master
Resolved issues and error corrections
This fixes an internal data consistency issue that could cause searches involving linked records to miss valid results. Businesses benefit from more accurate record lookups and reports in cases where related data has pending updates that have not yet been saved to the database.
Original PR description
Consider two models A and B, where - model A has a many2one_reference field `res_id` with model field `res_model`; - model B has an auto-join one2many field `stuff_ids` to A using field `res_id`; -…
Consider two models A and B, where
- model A has a many2one_reference field `res_id` with model field `res_model`;
- model B has an auto-join one2many field `stuff_ids` to A using field `res_id`;
- the field `res_model` is not flushed on some record.
```
model | A | B
-----------+-------------------+-------------------
memory | res_model = B |
-----------+-------------------+-------------------
database | res_model = NULL | id = 42
| res_id = 42 |
| foo = 'bar' |
```
Now, perform a search on model B that should return record with id=42 by matching some condition on the unflushed record in model A, like:
```py
B.search([('stuff_ids.foo', '=', 'bar')])
```
Before this patch, the search method would not flush the field `res_model`, which causes the method to return incorrect results. This patch fixes the issue by ensuring that searches on one2many fields flush all the fields on which the one2many field depends.This fixes an issue where users saw a placeholder image instead of the actual company logo. Company branding will now appear correctly in the web interface, improving consistency and professionalism.
Original PR description
`odoo.tools._vendor.send_file` is called with the kwargs of `http.send_file`; it raises error and the `http.Stream.from_path` is always called instead. Current behavior before PR: It always shows the placeholder logo rather than the company logo Desired behavior after PR is merged: Show the company logo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an error that prevented users from opening the debug menu. The change restores access to debugging tools used for support and troubleshooting, reducing interruptions for administrators and implementers.
Original PR description
Description of the issue/feature this PR addresses: Cannot open the debug menu due to this error: `Cannot read property 'view_id' of undefined`. The error occurs on `master` branch. I Also checked the `runbot`, with the same issue (see the screenshot). Current behavior before PR:  Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Since this commit [1], when you select the Header position option and set it to "Over The Content", the change is not saved if you did not edit something else in the page too. Indeed, now that the "save" works correctly (and that it no longer saves the page every time). It does not detect the change made by this option which is to add a class on the '#wrapwrap' element. (The editor looks for changes inside the wrapwrap but not on it). With this commit, we add the 'o_dirty' class on th
Original PR description
Since this commit [1], when you select the Header position option and set it to "Over The Content", the change is not saved if you did not edit something else in the page too. Indeed, now that the…
Since this commit [1], when you select the Header position option and set it to "Over The Content", the change is not saved if you did not edit something else in the page too. Indeed, now that the "save" works correctly (and that it no longer saves the page every time). It does not detect the change made by this option which is to add a class on the '#wrapwrap' element. (The editor looks for changes inside the wrapwrap but not on it). With this commit, we add the 'o_dirty' class on the '#wrap' when a page option is changed in order to notify the editor that the page should be saved when the "save" button is clicked. [1]: https://github.com/odoo/odoo/commit/bab673488e185ddd7792aedecc3870663290fed3 task-2871426 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#95958 Forward-Port-Of: odoo/odoo#93440