I have a field and a function for computing this field
'score' : fields. ....the function like that: (I compute 'myfield' by 'score')
'myfield' : fields.function(_calculate_field,...)
def _calculate_field(self, cr, uid, ids, arg, context=None):
result = {} for i in range(len(ids)): item = self.browse(cr, uid, ids[i], context=context) if item.data:
...
result[ids[i]] = ... else: result[ids[i]] = '' return result
It work both tree view and form view, it is to heavy because it compute all the records.
I want it just work when I click on 1 record and access to form field, and compute just this record
Sorry for my bad english, thanks for any help