Hello Team,
I am using Odoo 14 Studio to calculate number of days between two dates and this is what I used and it is not working
for record in self:
If record.x_studio_start_date > record.x_studio_end_date:
raise ValidationError('Start date should not greater than end date.')
else:
record.x_studio_expected_no_of_days = (record.x_studio_end_date - record.x_studio_start_date).days
Thanks for all your help