@api.depends('category_id')
def compute_duration_display(self):
if self.category_id == 1:
self.number_of_days_display = 10
elif self.category_id == 2:
self.number_of_days_display = 10
elif self.category_id == 3:
self.number_of_days_display = 15
elif self.category_id == 4:
self.number_of_days_display = 20
i tried this code but iam getting error.
Thanks for your answer.
Then how can i compare without using id's?