Tuesday, November 28, 2023
4 changes · master
Code cleanup and technical improvements
Many-to-one fields now use the same context rules as other context-dependent fields, combining relevant global, backend, and view-defined settings. This makes field behavior more consistent across the interface while preserving the special handling needed when opening a record form.
Original PR description
The goal of this commit is for the Many2oneField to use the same context as the other context-dependent fields (x2manyField, ...). To do this, we need to pass the context generated by dynamicInfo.context, which corresponds to the union of the global context, the backend field and the context defined on the <field> in the view arch. In Many2oneField, we just have to make an exception for the context used in order to open the record in form view (openAction), in this case, we have to ignore the global context. Description of the issue/feature this PR addresses: 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
Live chat operators are now represented using the same persona model used elsewhere in messaging, replacing a harder-to-manage internal format. This should make operator names more consistent and give businesses better control over the live chat username shown to visitors.
Original PR description
Before this PR, livechat operator used an obscure format. This PR transform the operator in persona and add a better controle over `user_livechat_username`.
This change stops kanban views from automatically saving every field when no special save setting is provided. It helps ensure fields marked as read-only remain protected, reducing the risk of unintended data changes while preserving expected progress bar behavior through tests.
Original PR description
In commit 47e66bf49f30b47c0883e718a4e483053417071a, we decided to pass all the fields in a kanban view in forceSave = true mode if nothing is specified in the arch. This choice was made for the ProgressBarField. We believe that this historical decision is wrong because a field that is readonly on the server side should not be editable. In this commit, we are therefore going to remove this choice. Description of the issue/feature this PR addresses: 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
Many2one fields now use the same combined context information as other related fields, helping forms behave more consistently across views. This reduces the risk of mismatched defaults or filtering rules while preserving the correct behavior when opening records directly.
Original PR description
The goal of this commit is for the Many2oneField to use the same context as the other context-dependent fields (x2manyField, ...). To do this, we need to pass the context generated by dynamicInfo.context, which corresponds to the union of the global context, the backend field and the context defined on the <field> in the view arch. In Many2oneField, we just have to make an exception for the context used in order to open the record in form view (openAction), in this case, we have to ignore the global context.