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
- Účetnictví
- Sklad
- PoS
- Projekty
- MRP
This question has been flagged
1
Odpovědět
14915
Zobrazení
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}
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit se| Related Posts | Odpovědi | Zobrazení | Aktivita | |
|---|---|---|---|---|
|
|
0
pro 25
|
410 | ||
|
|
0
lis 25
|
419 | ||
|
|
1
čvc 25
|
2301 | ||
|
|
3
čvn 25
|
1976 | ||
|
|
5
lis 25
|
20413 |