Tuesday, April 16, 2024
4 changes · master
New functionality added to Odoo
This pull request introduces an early proof of concept for a query builder utility in Odoo, along with test coverage in a dedicated test module. It is mainly an internal developer-facing change and is not expected to affect day-to-day business workflows yet.
Original PR description
Description of the issue/feature this PR addresses: Just a POC of Concept 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
This change adds or updates internal automated tests around private field handling in Odoo's test module. It helps ensure future platform changes do not accidentally expose or break restricted data behavior, with no direct impact on day-to-day users.
This adds automated coverage to ensure child records show the correct updated values after a parent form value changes, even when the detailed child form was not visible at the time. It helps prevent users from seeing stale or incorrect calculated values when opening related records in a form dialog.
Original PR description
The goal of this test is to check the behavior of an onchange when changing values in the parent form having impacts on the one2many children while the child form is not visible The child model is…
The goal of this test is to check the behavior of an onchange when changing values in the parent form having impacts on the one2many children while the child form is not visible The child model is defined with computed fields defined like: child.b = parent.a + 1 child.c = child.b + 1 child.d = child.c + 1 a, b, c, d are all integer fields. a is a regular stored field b, c and d are computed fields, each one depending on the previous one. In the parent form view, when changing a, the children are visible with a tree view, with only the field b in the tree view (so without c and d). When opening a child, the child form view appears, with the field b, c and d. This test checks that, when opening a child, the dialog with the form appears with the expected values for the field b, c and d according to the value of a e.g., in the parent form, when changing a to 1, in the child form, b == 2, c == 3, d == 4 Wrong behavior: https://user-images.githubusercontent.com/5822488/169538200-1469f8c6-f771-4998-aa63-a7dfb75c9bd5.mp4 Expected behavior: https://user-images.githubusercontent.com/5822488/169538358-78c95fcb-c1c2-4b63-90d1-890b3a86cd67.mp4
Odoo’s command-line shell can now run a chosen startup file before use. This helps advanced teams prepare useful shortcuts, imports, and variables automatically, making developer workflows faster and more consistent.
Original PR description
A `--shell-file` option is added to the REPL to be able to "prepare" the CLI environment, giving the user a way to customize it, with every shell_interface Odoo allows. - add out-of-the-box functions for power users - enable more REPL driven development - allow custom imports and prepare variables for REPL use