Hi
I have this problem when i wanna create new employe
in _compute_seniority TypeError: must be string, not bool
my function is
@api.depends('date_rejoindre')
def _compute_seniority(self):
for rec in self:
dt = rec.date_rejoindre
d2 = date.today()
d1 = datetime.strptime(dt, "%Y-%m-%d").date() # the line of the error
rd = relativedelta(d2, d1)
rec.anciennete = str(rd.years) + ' Ans ' + str(rd.months) + ' Mois ' + str(rd.days) + ' Jours'
THANK TOU