Odoo Aide

0

0
9 Answers
1
Avatar

Yenthe Van Ginneken

--Yenthe Van Ginneken--
22706
| 9 9 12
Turnhout, Belgique
--Yenthe Van Ginneken--

My Odoo training platform: https://www.oocademy.com
My Odoo blog: http://www.odoo.yenthevg.com/
My Twitter: https://twitter.com/Yenthe666

Yenthe Van Ginneken
08/01/2015 10:56

Hi Fotis

To fix this you have two options.
The first is to go to settings > Reports, find the correct QWeb report and open it. Modify the line <p t-field="o.date_order"/> here to <p t-field="o.date_order" t-field-options="{&quot;format&quot;: &quot;dd/MM/YYYY&quot;}"/>

The second option is to do it permanently (also when you update your module) by modifying the XML file for the report where the dateformat is wrong.
For example on a sale order you will see this in the code: (report_saleorder.xml under /addons/sale/views/)

<p t-field="o.date_order">

If you then modify it like this:

<p t-field="o.date_order" t-field-options="{&quot;format&quot;: &quot;dd/MM/YYYY&quot;}"/>

You will get a dateformat of d/m/Y in place of m/d/Y.

 

0
Xabier
20/02/2018 14:13

The best solution to keep the date localization is to do the following:

<p t-field="o.your_datetime_field" t-field-options='{"widget": "date"}'/>

0
Fotis Dimanidis
09/01/2015 11:32

Turns out this issue happens only to existing invoices. New invoice dates seem to be fine after changing date format settings. I have updated my github issue description to include this improvement for existing invoices as well.

1 Commentaires
Yenthe Van Ginneken
09/01/2015 11:40

This is not a bug or an error. Changing an approved invoice is technically even illegal as it is an official and finale document.

Poser une question
Étiquettes
Keep Informed
3 Abonné(e)s
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now