Community: Framework mailing list archives

v8.0 - Cannot create computed field - Field is accessed before being computed.

Maxim Litnitskiy
- 10/14/2014 19:32:03
Hi dear Experts.
In old api we had no problems creating function fields like the following (from

'datas': fields.function(_data_get, fnct_inv=_data_set, string='File Content', type="binary", nodrop=True),  
In new api the following code is working on read / update, but gives error "Field is accessed..."  on create:

datas = fields.Binary(compute='_data_get', inverse='_data_set', string=_('File content'), required=True)

Is it supposed to work or not?

P.S. May be some concept has changed. I can imagine that in form edit mode I use real Binary field (not computed) and mirror it via @api.depend on computed field?