result=0 if record.trial_date_end and record.trial_date_start: date_start_year = record.trial_date_start.year date_end_year = record.trial_date_end.year date_start_month = record.trial_date_start.month date_end_month = record.trial_date_end.month result=(date_end_year-date_start_year)*12+(date_end_month-date_start_month) if record.trial_date_start.day == 1: result+=1
合同与协议模板员工试用期月份数占位符帮写,能根据试用期开始日期和结束日期自动计算出试用期月份数,谢谢