1. Use Odoo's Debug Mode
Enable Developer Mode:
Go to your Odoo instance.
Add ?debug=1 to the URL or use the developer tools from the settings menu.
Modify Field Properties Temporarily:
Navigate to the form where the field is readonly.
Use the developer tools to locate the field (Inspect Field option).
Temporarily remove the readonly attribute in the view by duplicating the view and editing it via the "Edit View: Form" menu.
Example:
Locate the XML snippet in the view:
xml
Copy code
<field name="quotation_date" readonly="1"/>
Remove readonly="1" or set it conditionally:
xml
Copy code
<field name="quotation_date" attrs="{'readonly': [('state', '=', 'done')]}"/>
Save and Reload:
After saving the view, reload the form. The field will now be editable.
2. Use Automated Actions
If modifying the field directly is not an option, you can use an automated action to update the field value programmatically.
Steps:
Go to Settings > Technical > Automated Actions.
Create a New Automated Action:
Model: Select the model you want to update (eg, sale.order).
Trigger: Choose On Update or On Time-Based Conditions.
Action: Add Python code to update the field.
Example:
python
Copy code
if record.id == your_record_id:
record.quotation_date = '2023-12-01'
Thanks Ray