I have a boolean field called x_studio_overdue
I would like to make this a calculated field where the value is True if the field x_studio_shipping_date is greater than the field scheduled_date
x_studio_shipping_date is a Date field type
scheduled_date is a Datetime field type
Here is the code that I created that didn't work:
for record in self:
ship_date = self.x_studio_shipping_date.strftime('%Y-%m-%d')
schedule_date = self.scheduled_date.strftime('%Y-%m-%d')
if ship_date > schedule_date
record['x_studio_overdue'] = True
else record['x_studio_overdue'] = False