Tuesday, April 11, 2023
2 changes · master
Code cleanup and technical improvements
This update changes how Odoo identifies fields internally so every field placement gets a distinct identifier from the start. This reduces ambiguity when the same field appears multiple times, helping prevent inconsistent behavior across views and automated tests without changing business workflows.
Original PR description
Before this commit, the field node id (`field_id`) uses the field name for the first occurrence on the arch, and add an underscore and a number for the rest of the occurrences. This can create inconsistencies when sombody assumes that the field_id is equal to the name, and don't take into account the possibility of multiple occurrences. Now, a unique id is created since the first occurrence, this remove all ambiguity between the id and the name. Part-of task-id 3179751
Odoo now assigns unique identifiers to field elements from the start, reducing ambiguity when the same field appears multiple times on a page. This internal cleanup helps prevent inconsistent behavior in views and supports more reliable automated testing across several business apps.
Original PR description
Before this commit, the field node id (`field_id`) uses the field name for the first occurrence on the arch, and add an underscore and a number for the rest of the occurrences. This can create inconsistencies when sombody assumes that the field_id is equal to the name, and don't take into account the possibility of multiple occurrences. Now, a unique id is created since the first occurrence, this remove all ambiguity between the id and the name. Part-of task-id 3179751