I would like to know how to change the properties of a base field to change it from Read-Only to Not Read Only.
The field in question if requested_date, part of the sale,order model. It was created by the sale_order_date module. When you have a quote the requested date can be varied, but once the order is confirmed the value becomes read only and this date cannot be changed.
I want to be able to edit this requested_date value, even after the order is confirmed
It is created in sales_order_dates.py
'requested_date': fields.datetime('Requested Date', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, copy=False,
If I just change this file to read readonly=False, then it works, but I want to do this from my custom module. I can add new fields easily in the my_module.py file:
class sale_order_template(models.Model):
_name = 'sale.order'
_inherit = 'sale.order'
new_field= fields.Char('New Field', required = False, readonly=false)
But how am I able to edit the attributes of an existing field, i.e. required_date?
Thanks in advance.
Nigel