Hello Everyone,
I am customising in purchase order workflow.
i have added three new states in existing states.
i am done with everything but there is "READONLY_STATES" dictionary is declared for make fields readonly in particular states.
READONLY_STATES = {
'purchase': [('readonly', True)],
'done': [('readonly', True)],
'cancel': [('readonly', True)],
}
for that i write following code.
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
READONLY_STATES = {
'open': [('readonly', True)],
'partial received': [('readonly', True)],
'received': [('readonly', True)],
'purchase': [('readonly', True)],
'done': [('readonly', True)],
'cancel': [('readonly', True)],
}
but its not work.
I tried inherit it by importing class also but that is also not work.
I do want to know the answer of this as well. import purchase.py and re-assign READONLY_STATES doesn't help.