Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
6506 Lượt xem

I'm brazilian and I'm editing report_saleorder_document


In portuguese dates are written like this:

21 de setembro de 2020

but I don't know how to write the word de on my report


My code:

<t t-set="o" t-value="doc.with_context({'lang':doc.partner_id.lang})"/>
  <span t-field="o.date_order" t-options="{'widget': 'date', 'format': 'dd de MMMM de YYYY'}" />
</t>

gives me

19 197 setembro 197 2020

Odoo sees the word de as d for day and e for whatever


My questions:

1- How can I fix that? Does odoo date have an escape/wildcard for this situation?

2- I also need to adjust my odoo's clock since my odoo thinks that today (september 21, 9am, GTM -3) is actually september 19, 8pm, GTM -3. Is this normal? How can I fix it?


s


s

d

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Hugo,

You can look at all the date formats in the language setting in Odoo.

You can set the Timezone in the User's setting to fix the clock issue.

You can find the following formats inside the "Settings/Translations/Languages" and then open any language. At the bottom, you will see this.


Ảnh đại diện
Huỷ bỏ
Tác giả

It worked, thanks! Where did you get that image from? Is it inside odoo?

Btw, here's my code if anyone has the same problem:

<span t-esc="o.date_order.strftime('%d de %B de %Y')"/>

Good to know it helped you. Yes, this is in the Odoo.

You can find it inside the "Settings/Translations/Languages" and then open any language. At the bottom, you will see this.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 24
16810
4
thg 8 24
77402
1
thg 1 17
4560
1
thg 3 15
7881
2
thg 5 25
1782