Friday, January 6, 2023
2 changes
Enhancements to existing features
This update prevents validation errors in specific Odoo views by removing an unsupported rental report directive and temporarily exempting the Knowledge article form from new validation rules. This helps keep affected screens working while stricter checks are introduced to improve system reliability.
Original PR description
[FIX] sale_renting: remove unsupported t-field in arch This commit is the enterprise counter part of odoo/odoo#107083. `t-field` isn't a valid qweb directive. As a matter of fact, the commit…
[FIX] sale_renting: remove unsupported t-field in arch This commit is the enterprise counter part of odoo/odoo#107083. `t-field` isn't a valid qweb directive. As a matter of fact, the commit introducing it noted that it wasn't working [1]. Now that we validate qweb directives used in archs, this one would throw an error. We thus remove it. Task 3085357 [1] https://github.com/odoo/enterprise/commit/11a41bb72a1f045702f37eddc0f583a025112d0c#diff-97c66f033e6f370fadfb24d5cea5f6a09ab3e95ceda55b0c90e38aa1c9d24425R75] [IMP] knowledge: ir.ui.view: bypass owl directives validation The arch of the knowledge article form view is written as an owl template. It uses several owl directives and a lot of js implementation details, which is forbidden. PR odoo/odoo#107083 adds validation steps to detect forbidden owl directives in archs. As a consequence, the knowledge form view would crash at validation. This commit bypasses the validation for the knowledge form view. This override could be removed as soon as that view is fixed (it should become a client action). Task 3085357
This update adds a validation check to ensure a view’s main structure matches its declared type. It helps prevent incorrectly configured views from being saved, reducing the risk of broken or inconsistent user interfaces.
Original PR description
This PR follows #108073
Just ensure the root node of the view architecture matches the view type.
e.g.
Valid:
```xml
<form>
...
</form>
```
Invalid:
```xml
<data>
<div>
...
</div>
<form>
...
</form>
</data>
```