代码: today = datetime.date.today() reminder_day = today + datetime.timedelta(days=self.reminder_advance_days) instances = env['hr.employee'].search([('x_jlzdqr', '=', reminder_day),('active', '=', True)]) if instances: instances = instances - instances.filtered( lambda emp: emp.termination_date and emp.termination_date <= reminder_day)
result =
===== today = datetime.date.today() reminder_day = today + datetime.timedelta(days=self.reminder_advance_days) instances = env['hr.employee'].search([('x_gzzdqr', '=', reminder_day),('active', '=', True)]) if instances: instances = instances - instances.filtered( lambda emp: emp.termination_date and emp.termination_date <= reminder_day)
从员工身上找居留证到期日、工作证到期日、家庭居留证到期日 需要把出发条件调整一下 改成取员工身上的信息