如何在 odoo xml 中获取之前的日期

How to get previous date in odoo xml

<span t-esc="context_timestamp(datetime.datetime.now()).strftime('%d-%m-%Y')"/>

我想在 report.Please 帮助中显示当前日期之前的日期。

试试这个...

<span t-esc="context_timestamp(datetime.datetime.now()-datetime.timedelta(days = 1)).strftime('%d-%m-%Y')"/>