hi
I want set "readonly=True" for a sequence field in every states, for example, for in sale order form : "order reference" field.
in .py code:
'name': fields.char('Order Reference', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}, select=True),
I delete ------> states={'draft': [('readonly', False)]}
so:
'name': fields.char('Order Reference', size=64, required=True, readonly=True, select=True),
but when I restart server and check this field: field is grade, but when I create a sale order , the "order refrence" field is for example "SO/001" but when save so, this field change to "SO/002" and the same
"SO/003" when save , this field change to "SO/004"
so always all of Odd numbers or even numbers is lost.
I don't know what is problem?
Thanks