How can I include today's date—not the invoice date, or sales order date, etc.—in the Jinja2 template for an email? I've tried using normal `datetime` functions, but they seem to crash the template.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
13945
Tampilan
use ${datetime.datetime.today().date()} in the template
Perfect. Thanks. If it helps anyone else, I was able to calculate an invoice's days past due with ${(datetime.datetime.today().date()-object.date_due).days}
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
3
Jun 25
|
558 | ||
|
5
Mei 25
|
17296 | ||
|
0
Apr 25
|
803 | ||
|
1
Apr 25
|
1054 | ||
|
0
Mar 25
|
1001 |