Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3764 Widoki

I have this code:

                                />, what I am doing is importing the create_date to my qweb, I have to put the date widget because if I delete it, the date is printed one hour ago, and it prints me with the format 01/01/2022, which What I want to do is change the format type from qweb to November 17, 2022, and I'm trying this way:

                                   /> but in the end it gives me this error: ValueError: time data 'November 17, 2022 06:03' does not match format '%Y-%m-%d %H:%M:%S', Is there a way to be able to change the format type in the create_date without having to remove the widget from qweb? or from python? I would appreciate your help. Odoo 14 community

Awatar
Odrzuć

Looks like below:

<p>Dated this <span class="" t-esc="doc.task_id.apply_date.strftime('%d')"/> day of <span class="" t-esc="doc.task_id.apply_date.strftime('%B %Y')"/></p>

Najlepsza odpowiedź

Hi,

try this code

<t t-esc="doc.date_order.strftime('%B %m %Y')"/>


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lip 23
6327
1
cze 23
4340
1
kwi 23
5052
1
paź 21
12090
0
paź 21
1939