Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

Changing The OpenERP's Calendar : An Open Question ?

Subscribe

Get notified when there's activity on this post

This question has been flagged
2 Replies
11795 Views
Avatar
Med Said BARA

This Question begins Here:

What's not, the goal of this question ?

To be, a « Yet Another Question About Internationalization and Localization ». (This is absolutely not the case).

What is the goal , of this Question ?

Replacing the OpenERP's standard Gregorian Calendar by a Hijri (Islamic) calendar, or giving the possibilitie to the user to choose the calendar he want to use.

Why not, there are probably thousands of OpenERP users around the world, and in many countries, where Gregorian calendar is not used, or at least an other calendar is in use (e,g Ethiopian, Thai, Chinese, Hindu, Hijri, Oromo, Somali, Iranian, Hebrew, Bahá'í … Calendars),

http://en.wikipedia.org/wiki/List_of_calendars

This lead us to a new question : How to change from the OpenERP's standard calendar, to any other calendar ?

Is there any possibilities to do that, in OpenERP, and How to achieve this task (using the OpenObject framework)?

Should us build a new module : Coded in Python or a Web module with JS ...?

Or, should us just modify an existing module ?

Can we do that, without the need of patching the original code , and without breaking it?

How to do this, without having to reinvent the wheel ?

Before going further, we must clarify something, which is for me a crucial point :

The Calendar is just the apparent part of the iceberg, and the hidden parts are, date and Time.

So, How Time, Date, and Calendar are handled in OpenERP ?

  1. From this LINK (response from Fabien Pinckaers)

    • Data are stored in the database in UTC (not depending on the timezone of your users)

      When the client receives the data, it translates it according to the timezone of the user which is on the global context that comes from the user preferences (so, the date/time you see on the screen is not the same than the one in the database)

      The client sends back the new dates to the server under the UTC format

  2. Read also this https://github.com/WillowIT/Pentaho-reports-for-OpenERP/wiki/Some-Notes-about-Dates-and-Datetimes

  3. Known also that OpenERP relies on the following python libraries to handle all the Time, Date and calendar Data.

    Python Time - https://docs.python.org/2.7/library/time.html#module-time

    Python datetime - https://docs.python.org/2/library/datetime.html#module-datetime

    Python Calendar – https://docs.python.org/2.7/library/calendar.html?highlight=calendar#module-calendar

    Unfortunately, all this work was done based on the Gregorian calendar.

And this is also the case for Postgresql: the 'datetime values' are constrained by the natural rules for dates and times according to the Gregorian calendar ( taken from http://www.postgresql.org/docs/current/static/datetime-units-history.html)

  1. At the web side OpenERP use the following libraries: Javascrip dates used for parsing, formatting and processing - * jquery-ui-timepicker-addon* used to add a datetimepicker, datepicker or timepicker dropdown …

Where to begin ?

Lost between Python, Javascript, and Postgresql.

But, Time, Date and Calendar works fine in OpenERP (for the Gregorian sytem) !

The first idea that comes to me is, to just use Two functions in one single JS file, for converting from and to Gregorian calendar :

-The first, for converting from Gregorian to Hijri (or to any other calendar system) after reading data from DB and just before returning the result, to the calling function.

  • The second, for converting from Hijri to Gregorian, Just before returning the data for writing into the DB.

    And let OpenERP Web doing his Job as before.

This way, we don't have to overwrite any files, but just inserting 2 calls to the related functions ( for example in dates.js). (No need to reinvent the wheel).

Is this enough ?

Certainly, not.

The next step, is to deal with the datetimepicker , and the hidden things …

Personnaly i've tried with 3 JS files:

https://github.com/xsoh/Hijri.js/blob/master/Hijri.js

https://github.com/talomaireeni/Umm-Al-Qura-Calendar/blob/master/UQCal.js

and http://www.al-habib.info/islamic-calendar/hijricalendartext.htm

and i can't get a suitable result, except the correct conversion of the current date field.

This is certainly due to my lack of mastery of Javascript, the lack of the OpenERP technical documentation, and the time reserved for this task.

Tired of reading all the Firebug error messages, and the JS code, tired of reading between the lines of python code to see how things are done, to try to understand what's going on, and what's wrong.

So tired, that i've decided to stop working, and take a rest for some moments, take a cofee and browse the web ...

Browsing the web, with the help of my favorite search engine, and as if by chance i came across this link:

jQuery Calendars

A wonderful thing.

This is an Open Question: Everyone interested by this subject should contribute not only by giving an answer, but above all by contributing to the question itself.

A way to show that the subject of the question is of great importance for many of OpenERP users.

And why not, making the solution to this question a part of the OpenERP Web.

The next steps ...

Giving the Responses ...

Building the Solution ... With the help of jQuery Calendars

To be continued ...

7
Avatar
Discard
Remya

I vote for this question. I asked this question before 2 week ago. But reply. Then I tried to copy-paste the default js file and tried to edit with islamic details. But it still contains some bugs & no output.

Med Said BARA
Author

Hi Remya, try with the Jquery Calendars to see what we can do, it's a complete solution. You can also keep on trying with the JS files mentioned above, it's a good exercise. Tomorrow, i will post the last results i've obtained.

Remya

Thanks for your reply. I'm also trying.

rosey

Any Updates, Med Said BARA? I tried with the jquery calendar, but still showing the English calendar and some bugs. Did you got any progress, if anything please update the answer. So that i can move a little bit forward. Thanks and awaiting your reply.

Alaa Eldin s a kettaneh

Please can you help me, Where should I add these files ????

Avatar
Med Said BARA
Author Best Answer

I'm back.

After one week there are no answers,no contributions.

Trying to attach a video file without success, so i've uploaded it here.

(For Remya)

This is from my last work with the islamicdatejs

We can get a better date format ...

We can get a similar result with Hijri.js.

This is far from being a finished work ...

Pending the solution with "jquery calendars", Hard to do !

1
Avatar
Discard
Remya

Did you stop your work??

Med Said BARA
Author

No i didn't, but i am very busy with my work at this moment, i will try to work on the "jquery calendars" this weekend (Friday and Saturday).

Remya

Very Good to hear. I will wait for your updates.

Remya

But i'm really stuck with this issue.

Med Said BARA
Author

Which issue ?

Remya

Islamic calendar issue. i want to implement calendar on my openerp application.

Remya

I hope, did you start your work? I am also continuing with it. Let me know if any updates.

rosey

Hi Med Said BARA, Any updates about islamic calendar?

Avatar
Mohammed Mansour
Best Answer

I have finished the convertion to hijri calendar in a separate module but the issue that i have is that calendar overrides the georgian calendar date so now the calendar of the system is hijri only, I'm working on to make it according to the user language ISA.

Also i have developed a simple workaround to solve this issue until i finish my previous hijri module where the user can see multi calendars like hijri, georgian and persian and he can set and change all the calendars once he change any of these date fields.

 

 

1
Avatar
Discard
Med Said BARA
Author

Good to know, keep on and good luck.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now