#field in the model "stock":
damaged_books=fields.Integer(compute='find_damage')
#code to get the count of damaged books(field name "status") from the model "bookinfo":
@api.depends()
def find_damage(self):
count=self.env['bookinfo.status'].search_count([('status','=','damage')])
self.damaged_books=count
The above code shows nothing, is there any wrong with the syntax or with the logic ??