Tuesday, May 2, 2023
1 change · master
Resolved issues and error corrections
This change makes Odoo field components correctly respect read-only rules when the same field appears multiple times in a view. This helps prevent fields from being editable or locked incorrectly, improving consistency for users working with complex forms and lists.
Original PR description
In many field composents, we need to know if the field modifier is readonly or not. So we use the function record.isReadonly(fieldname) to get the information. This one is false if we have several times the same <field> defined in a view. We will only listen to the modfier.readonly of the last occurrence. To solve this problem and allow the use of several fields in the same view with different modifiers, we will have to extract the readonlyModifiers and evaluate it in the field component. Part of task: 3179751 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