Daily updates from Odoo
Monday, March 6, 2023
3 changes
Code cleanup and technical improvements
This internal cleanup ensures field components use the settings from the exact view element being displayed, rather than accidentally reusing settings from another matching field. This reduces the risk of inconsistent behavior in screens where the same field appears multiple times with different options.
Original PR description
This commit is to replace all uses of activeFields in Field composents by passing fieldInfos to extractProps. We will therefore retrieve the node-dependent information in the extractProps function.
Why?
This ensures that the info used is that of the correct node. Because the activeFields function contains the information from the last node that referred to the same field.
Example:
<tree>
<field name="a"/>
<field name="a" context='{'b':"yop"}'/>
</tree>
For the first field:
FieldInfo.context = {}
activeField.context = {'b':"yop"}
For the second field:
FieldInfo.context = {'b':"yop"}
activeField.context = {'b':"yop"}
Part of task: 3179751This update removes old testing support code that is no longer needed after related areas were moved to the newer interface framework. It should not change day-to-day user workflows, but helps keep the codebase simpler and easier to maintain.
Original PR description
The corresponding codebases have been converted to owl, and those patches are no longer useful.
This update renames an internal label used when working with related fields, making the code easier for Odoo teams to understand and maintain. It does not introduce new functionality or change the user experience, but helps reduce confusion for future development.
Original PR description
[REF] *: rename fieldsToFetch to relatedFields We take advantage of the change of api made in commit https://github.com/odoo/odoo/commit/145540921f2629ae188c84dee17c8d95dccdde16 to rename FieldsToFetch to relatedFields.These two commits are in the same version of odoo (16.2). FieldsToFetch is not a good name for defining the fields to be fetch for relational fields. So we decided to rename it to relatedFields. Part of Task: 3179751