Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] sale: correctly send field data
Since f0beddf, the crud rights of readonly fields is not sent to the client anymore. In most cases, it has no impact, but for fields readonly server-side and specified as editable in the xml, the client will consider relational fields as always creatable and writable. See: * many2one_field.js where canCreate and canWrite are undefined in this situation because the server doesn't send the crud data. * owl library, where undefined props fallback on the default props value, which is true for Many2OneField canCreate and canWrite. After investigation, it has been concluded that modifying the data sent to the client was too heavy for such a rare usecase that we don't want to support anymore. This commit fixes the only know case where a readonly field was supposed to be editable client side, by converting it to a compute editable, s.t. the server doesn't consider it as a readonly field and correctly sends all the necessary information to the client for this field. It also allows users to disable product templates creation & update in the lines of a Sales Order (and makes sure that if it's enabled, you have the creation/edit rights to see 'Create' & 'Create & Edit' dropdown choices). opw-3144319 opw-3140988 opw-3080838 closes #111506 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
- Loading branch information