Hello Gurus
I am confused by this error. Both values should be datetime, shouldnt they??
As you can tell, I am not much of a programmer.
scheduled_start = fields.Datetime(string="Scheduled Start", default=lambda self: fields.Datetime.today(), tracking=True)
scheduled_finish = fields.Datetime(string="Scheduled Finish", default=lambda self: fields.Datetime.today(), tracking=True)
ERROR:
if vals['scheduled_finish']
TypeError: '
Ive tried to cast to datetime and str types but no combination seems to work. Little help please?
TIA
Not sure what happened to the rest of the error but I'll try again:
if vals['scheduled_finish'] < self.scheduled_start:
TypeError: '<' not supported between instances of 'str' and 'datetime.datetime'