Friday, September 1, 2023
6 changes
Resolved issues and error corrections
Forms now update client-side visibility and requirement rules immediately when users add related records that have not yet been saved. Server-facing filters and defaults continue to ignore those temporary records, reducing the risk of errors while keeping the interface responsive.
Fields that are only needed as dependencies in forms are now treated as read-only unless explicitly made editable. This prevents accidental edits and avoids sending unintended data when records are created or updated.
Original PR description
The purpose of this commit is to make fieldDependencies are readonly by default. This avoids making fields unintentionally editable. If the field is editable, it will be sent during create/write, which is what we want to avoid.
Use case:
Go to a form view with 2 fields "a" which is readonly and "b" which has "a" as fieldDependencies.
Before this commit:
Record Datapoint thinks that field "a" is editable
After this commit:
Record Datapoint thinks that field "a" is readonlyAfter regenerating employee work entries from the Gantt view, the screen now refreshes automatically so users can immediately see the updated entries. This removes the need to manually reload the page and makes payroll or scheduling checks more reliable.
Original PR description
task-3382376
Knowledge macros are now more reliable when interacting with form views, chatter, attachments, and rich-text fields. This reduces stalled or incorrect automation and makes Knowledge actions work across more business records that include editable note or description fields.
Original PR description
Keep only one form controller patch in Knowledge. Refine the way the chatter and html form fields are detected for Knowledge macros: - Instead of updating the `commandsRecordInfo` at every patch if…
Keep only one form controller patch in Knowledge. Refine the way the chatter and html form fields are detected for Knowledge macros: - Instead of updating the `commandsRecordInfo` at every patch if the record's id changed, it can be done as an `onWillUnMount` hook, since we only care about the last visited record of the form view. - Use a `CallbackRecorder` to accurately ask the `Chatter` whether the current user is able to send messages or attach files, instead of relying only on the presence of the chatter in the `xmlDoc`. - Add/Move some functions related to registering/discarding/validating a `commandsRecordInfo` in the `KnowledgeCommandsService` to limit the amount of functions added in the `FormController`. Use action service to restore the form view instead of clicking on the breadcrumbs in the DOM. Breadcrumbs are only checked to ensure that the current view has a breadcrumbs history. This is more robust against future designs of the breadcrumbs (where not every element of the breadcrumbs list is displayed directly as a link (some of them can be hidden in a popper). Add comments to better explain the macro processes and the `KnowledgeCommandsService`. Remove usage of `interval` macro property as it is obsolete since [1]. Add a timeout of 10 seconds for macros, to give back control to the user if a macro is stalled. Knowledge macros rely on the name attribute of a notebook page to switch between tabs in a Form notebook. That attribute is not mandatory, so some views with a valid html_field did not have one. This commit add the name attribute so those fields can now be manipulated by Knowledge macros. [1]: https://github.com/odoo/odoo/commit/3a798039d6f200f8e28448ddb6a2d3c46654a203 task-3410128
Fixed an issue where My Timesheets could show an error instead of sample data when no timesheet entries were available. The grid also now avoids overlapping row and section labels with the empty-state helper, making the empty view clearer for users.
Related form fields used behind the scenes are now treated as read-only unless explicitly made editable. This prevents unintended changes from being saved when creating or updating records, reducing the risk of accidental data edits.
Original PR description
The purpose of this commit is to make fieldDependencies are readonly by default. This avoids making fields unintentionally editable. If the field is editable, it will be sent during create/write, which is what we want to avoid.
Use case:
Go to a form view with 2 fields "a" which is readonly and "b" which has "a" as fieldDependencies.
Before this commit:
Record Datapoint thinks that field "a" is editable
After this commit:
Record Datapoint thinks that field "a" is readonly