Odoo Help

Welcome!

This community 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.

0

How to change the calendar culture

By
Omid Rezvani
on 8/19/13, 5:16 AM 1,812 views

I have installed openerp on my computer and I want to run it for a company which uses another calendar culture (instead of Georgian one)

How can I change the calendar cultue? I have written a code to convert the dates, I also changed some of the javascript files related to the web calendar but nothing changed (are they stored in the database? why openerp did not considered my changes on javascript and po files?)

1
Laura Jarvenpaa
On 8/19/13, 8:04 AM

I have noticed that the calendar changes based on the locale code in language (we made a custom language file but because custom locale codes are not supported in OpenERP we had to use existing one so I just randomly picked up one but it's calendar was not right and when I changed the locale code to another, calendar changed to correspond the calendar on that location which was what we wanted) so if you want to change calendar without changing the language change the locale code. OpenERP seems to download date formats etc. somewhere online based on the locale code which also means that you can use locale codes for languages which doesn't have translations in OpenERP. However, note that if you put there locale code that is same as locale code for already existing language (e.g. en_US) it will overwrite that language file (happened to me when I changed locale code of our custom file into en_US so it overwrote language file for English).

I want to change both the language and the date culture. I loaded a translation automatically, but the date didn't changed. Do you know why is that? Or do you know how to solve it?

Omid Rezvani
on 8/19/13, 8:35 AM

I don't know why it didn't change for you, for me they changed based on the locale code so I would assume that if it doesn't change for your language they somehow get your language's calendar definition wrong from the place where they get them (which is if I have understood right from somewhere online). But as I don't know the details how and where they get the language information I can't help you with this.

Laura Jarvenpaa
on 8/19/13, 11:30 PM

Laura, I checked the source code and have a little understanding of what's going on, if you are using another language culture and know a little programming, you can definitely help me solve this (by helping me compare what to change). Are you a developer of openerp or you just use it? My gmail id is 'orezvani' and I would really appreciate it if you could help me further

Omid Rezvani
on 8/21/13, 8:03 AM

I'm just using openerp, I know some programming so I guess I can try to help you if you didn't solve this already it seemed that you have got some more advice elsewhere?

Laura Jarvenpaa
on 8/22/13, 1:08 AM

I know that some of the date files are located in openerp/addons/web/static/lib/datejs/globalization But I don't know what should be changed to make the calendar work in another system. Can you check the java scripts related to your country (must be yourlanguagetag.js) and tell me what should I do?

Omid Rezvani
on 8/22/13, 4:57 AM

This is my link to my language file: http://bazaar.launchpad.net/~openerp/openerp-web/saas-1/view/head:/addons/web/static/lib/datejs/globalization/fi-FI.js You can see also other language files here http://bazaar.launchpad.net/~openerp/openerp-web/saas-1/files/head:/addons/web/static/lib/datejs/globalization/

Laura Jarvenpaa
on 8/22/13, 6:31 AM

This file contains information about the labels not the calendar conversions. BTW, I made changes on this file of my own language and nothing changed in the labels!

Omid Rezvani
on 8/22/13, 10:48 AM

You use Georgian calendar yes? I want to use Jalali (Solar) calendar.

Omid Rezvani
on 8/22/13, 10:49 AM

Ah ok, I had misread your question sorry... This may be what you need https://www.openerp.com/apps/7.0/web_persian_calendar/

Laura Jarvenpaa
on 8/22/13, 11:27 AM

Thanks for this module. But this module only changes the pop-up which is not completely what I want. I want to replace the solar date, wherever a date is demonstrated, For example filter items based on solar calendar, and other places.

Omid Rezvani
on 8/24/13, 2:13 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 8/19/13, 5:16 AM
Seen: 1812 times
Last updated: 3/16/15, 8:10 AM