四个占位符代码分别如下:
result = ''
if record.employee_id.person_id.education_ids:
for education_id in record.employee_id.person_id.education_ids:
if education_id.is_highest_education:
result = education_id.educational_background.name
================================
result = ''
if record.employee_id.person_id.per_national_ids:
for per_national_id in record.employee_id.person_id.per_national_ids:
if per_national_id.is_primary:
result = per_national_id.national_id
================================
the_amount=0
if record.employee_id.payroll_archive_ids:
the_date = '1900-01-01'
for archive in record.employee_id.payroll_archive_ids:
if the_date<=archive.effective_date.strftime('%Y-%m-%d') and archive.payroll_item_id.code=='PA001':
the_date=archive.effective_date.strftime('%Y-%m-%d')
the_amount = archive.amount*12
result = the_amount
================================
result = record.employee_id.hire_date.strftime('%Y年%m月%d日') if record.employee_id.hire_date else ''
================================
result = record.employee_id.termination_date.strftime('%Y年%m月%d日') if record.employee_id.termination_date else ''
四个占位符代码分别如下:
result = ''
if record.employee_id.person_id.education_ids:
for education_id in record.employee_id.person_id.education_ids:
if education_id.is_highest_education:
result = education_id.educational_background.name
================================
result = ''
if record.employee_id.person_id.per_national_ids:
for per_national_id in record.employee_id.person_id.per_national_ids:
if per_national_id.is_primary:
result = per_national_id.national_id
================================
the_amount=0
if record.employee_id.payroll_archive_ids:
the_date = '1900-01-01'
for archive in record.employee_id.payroll_archive_ids:
if the_date<=archive.effective_date.strftime('%Y-%m-%d') and archive.payroll_item_id.code=='PA001':
the_date=archive.effective_date.strftime('%Y-%m-%d')
the_amount = archive.amount*12
result = the_amount
================================
result = record.employee_id.hire_date.strftime('%Y年%m月%d日') if record.employee_id.hire_date else ''
================================
result = record.employee_id.termination_date.strftime('%Y年%m月%d日') if record.employee_id.termination_date else ''