for record in self:
if record.social_working_age and record.inner_working_age:
record['x_onboardbeforeworkyear'] = str(record.social_working_age-record.inner_working_age)
else:
record['x_onboardbeforeworkyear'] = 0
入职前工龄(x_onboardbeforeworkyear)=工龄(social_working_age)-司龄(inner_working_age)
for record in self:
if record.social_working_age and record.inner_working_age:
record ['x_onboardbeforeworkyear'] = str(record.social_working_age-record.inner_working_age)
else:
record ['x_onboardbeforeworkyear'] = 0