Hi, I have a custom object with a field definition as follows: 'field1' : fields.char('Field 1', size=10, required=True, readonly=True, states={'write':[('readonly', False)]}),
According to the documentation this field 1 show be readonly/writeable depending on the value of the 'state' field. Now I declared the 'state' field as follows: 'state' : fields.function(_calc_state, method=True, type='char', string="Status"), With the _calc_state function as: def _calc_state(self, cr, uid, ids, name, args, context): return 'write' And I added the status field to the view. The problem now is that the field 'state' is not initialized. Its value remain empty and as a consequence the readonly property of field1 is not evaluated. What went wrong? Thx Frederik _______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman/listinfo/tinyerp-users
