| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 804 |
| Technical Name |
ali_hijri_date |
| License | LGPL-3 |
| Website | https://github.com/aliiahmed20 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 804 |
| Technical Name |
ali_hijri_date |
| License | LGPL-3 |
| Website | https://github.com/aliiahmed20 |
Hijri & Gregorian Date Widget
Show every date in both the Hijri (Umm al-Qura) and Gregorian calendars
This module adds a hijri_date widget for any date field. The value is stored as a normal Gregorian date in the database, while the Hijri equivalent is computed on the frontend using the browser's native Intl API (Umm al-Qura), and converted back to Gregorian before saving. A built-in Date Converter wizard lets you translate dates between the two calendars in either direction.
The Widget in a Form
Both calendars visible at a glance, with a toggle for the primary one
Hijri Date Picker
Pick a date directly on the Umm al-Qura calendar
Date Converter Wizard
Convert between Hijri and Gregorian in either direction
Permission-Controlled Access
The Date Converter menu appears only for users in the "Hijri Date / Converter" group
The converter is gated by a dedicated security group. The top-level Hijri Converter menu stays hidden until an administrator grants a user the Hijri Date / Converter access right — so the tool is exposed only to the people who need it. Just enable the group on the user form (Settings → Users) and the menu becomes available.
Key Features
Dual Calendar Display
Every date shows both its Hijri (Umm al-Qura) and Gregorian values together.
Stored as Standard Date
Values are kept as normal Gregorian dates, so reports and filters keep working.
Accurate Conversion
Deterministic Umm al-Qura conversion via the browser's native Intl API.
Built-in Converter
A handy wizard to translate any date between the two calendars.
Permission-Controlled
The converter menu is gated by a security group and stays hidden until granted.
How to Use
Just add the widget to any date field in your view:
<field name="some_date" widget="hijri_date"/>
أداة التاريخ الهجري والميلادي
عرض كل تاريخ بالتقويمين الهجري (أم القرى) والميلادي معًا
يضيف هذا التطبيق أداة hijri_date لأي حقل من نوع تاريخ. يتم تخزين القيمة كتاريخ ميلادي عادي في قاعدة البيانات، بينما يُحتسب التاريخ الهجري المقابل في الواجهة الأمامية باستخدام واجهة Intl المدمجة في المتصفح (تقويم أم القرى)، ثم يُحوّل إلى الميلادي قبل الحفظ. كما يوفّر معالج تحويل التواريخ لتحويل التواريخ بين التقويمين في كلا الاتجاهين.
أهم المميزات
عرض التقويمين معًا
يظهر كل تاريخ بقيمته الهجرية (أم القرى) والميلادية في آنٍ واحد.
يُخزَّن كتاريخ قياسي
تُحفظ القيم كتواريخ ميلادية عادية، فتبقى التقارير والفلاتر تعمل كالمعتاد.
تحويل دقيق
تحويل دقيق لتقويم أم القرى عبر واجهة Intl المدمجة في المتصفح.
معالج تحويل مدمج
معالج عملي لتحويل أي تاريخ بين التقويمين الهجري والميلادي.
محكوم بالصلاحيات
قائمة المحوِّل محمية بمجموعة صلاحيات وتبقى مخفية حتى يتم منح المستخدم الصلاحية.
وصول محكوم بالصلاحيات
المحوِّل محميّ بمجموعة صلاحيات مخصّصة. تبقى قائمة محوّل التاريخ الهجري الرئيسية مخفيّة إلى أن يمنح المسؤول المستخدمَ صلاحية محوّل التاريخ الهجري، فلا تظهر الأداة إلا لمن يحتاجها. ما عليك سوى تفعيل المجموعة في نموذج المستخدم (الإعدادات ← المستخدمون) لتصبح القائمة متاحة.
طريقة الاستخدام
أضف الأداة إلى أي حقل تاريخ في العرض:
<field name="some_date" widget="hijri_date"/>
Please log in to comment on this module