Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2005 Visualizzazioni

addons/hr/model/hr_employee.base.py
Code:
resign_date = fields.Date(string="Resign Date", default="9000-12-31")

addons/hr/report/hr_employee_report.xml
PS:hr_employee_report.xml(Customize Report)
Code:
<td>
    <t t-if="l.resign_date != datetime.datetime.strptime('9000-12-31','%Y-%m-%d')">
         <span t-field="l.resign_date"/>
     </t>
</td>
But in the printed report the date of '9000-12-31' still display
Even I tried the below code,still got the same result.What is the issue of the code?
<t t-if="l.resign_date != 9000-12-31">
<t t-if="l.resign_date != '9000-12-31'">

Avatar
Abbandona

first check l.resign_date has any value or not.

Post correlati Risposte Visualizzazioni Attività
0
ott 24
1812
0
ago 24
1620
0
gen 24
2104
1
nov 23
1824
0
giu 23
2184