Saturday, September 24, 2022
5 changes · master
Miscellaneous changes
The test was running by luck because the event and all talk pages contains the needed elements. The favorite was checked randomly on other pages because those steps are way faster than loading the page. This test will fail in rare case if the page loads faster and the step checking if the "favorite is on" occurs when the talk page is finaly loaded. This commit adds some step to try to ensure the page are loaded before doing anything else. Also enable ticks on freezetime so that we
Original PR description
The test was running by luck because the event and all talk pages contains the needed elements. The favorite was checked randomly on other pages because those steps are way faster than loading the page. This test will fail in rare case if the page loads faster and the step checking if the "favorite is on" occurs when the talk page is finaly loaded. This commit adds some step to try to ensure the page are loaded before doing anything else. Also enable ticks on freezetime so that we have an idea of the steps durations in logs for easier investigation. Forward-Port-Of: odoo/odoo#99928
The cache currently fails to correctly invalidate relational fields that depend on a non-relational field. Two passes of invalidation are done, to reflect dependencies on both the old and the new written values. In the first pass only relational fields are considered, as explained in the comments: > It is best explained with a simple example: consider two sales orders SO1 and SO2. The computed total amount on sales orders indirectly depends on the many2one field 'order_id' linking lines to th
Original PR description
The cache currently fails to correctly invalidate relational fields that depend on a non-relational field. Two passes of invalidation are done, to reflect dependencies on both the old and the new…
The cache currently fails to correctly invalidate relational fields that depend on a non-relational field. Two passes of invalidation are done, to reflect dependencies on both the old and the new written values. In the first pass only relational fields are considered, as explained in the comments: > It is best explained with a simple example: consider two sales orders SO1 and SO2. The computed total amount on sales orders indirectly depends on the many2one field 'order_id' linking lines to their sales order. Now consider the following code: > > line = so1.line_ids[0] # pick a line from SO1 > line.order_id = so2 # move the line to SO2 > > In this situation, the total amount must be recomputed on *both* sales order: the line's order before the modification, and the line's order after the modification. The written values can be seen as the roots of a dependency forest (a collection of dependency trees). Before this commit all non-relational roots and their corresponding trees were filtered out during the first pass. However, this approach is wrong, as relational fields can also depend on non-relational fields. Instead, the complete dependency forest has to be traversed, skipping invalidation for non-relational fields during the first pass. The test that was previously included accidentally succeeded because of a separate and unrelated bug in the orm domain parser: in certain one2many or many2many leafs the domain parser would not take into consideration the domain included in the definition of the field. As a result, the test still passed on accident, because the records that no longer matched the domain after the write were still invalidated during the second pass. The problem can clearly be demonstrated, however, when the dependency is generated by a compute function. Forward-Port-Of: odoo/odoo#91547
Enterprise part of odoo/odoo#100958 Forward-Port-Of: odoo/enterprise#31696
Original PR description
Enterprise part of odoo/odoo#100958 Forward-Port-Of: odoo/enterprise#31696
searching on ir.model can lead to access right error for non-admin users, using _get_id is better Forward-Port-Of: odoo/enterprise#31704
Original PR description
searching on ir.model can lead to access right error for non-admin users, using _get_id is better Forward-Port-Of: odoo/enterprise#31704
- correct `.tx/config` file - do not export `attribute` content - export 16.0 source terms Forward-Port-Of: odoo/odoo#100958
Original PR description
- correct `.tx/config` file - do not export `attribute` content - export 16.0 source terms Forward-Port-Of: odoo/odoo#100958