Hello
I want to get the amount for a specific employee, here's my function when I print the result I get all the sum of the records.
def get_sum(self, ):
for rec in self:
rec._cr.execute("SELECT sum(loan_amount) from hr_loan GROUP BY employee_id")
results = rec.env.cr.fetchall()
result = float(''.join(map(str, results[0])))
print("summmmmmmmmmmmm",result)
return result