My code:
def get_score(self, cr, uid, ids, context={}, arg=None,obj=None):
result = {}
for f in self.browse(cr, uid,ids):
net_score = float(f.earn_score.f.availed_score)
result[f.id] = net_score
return result
'net_score': fields.function(get_score, method=True, string='Net Score',type='float'),
This methods works fine on form view shows correct net score for every player, but when i want to display the same field in Kanban view, it sums up net_score for all players displayed on Kanban view, shows the same accumulated score for all.
How can I display net_hours for every player in Kanban?
When I went through the code i found one mistake there : net_score =float(f.earn_score.f.availed_score)
I m not sure but hope it should be : net_score = float(f.earn_score + f.availed_score)
And the to show the net score at kanban as well as the other views you can try the below code: