| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 1481 |
| Technical Name |
mh_hijri_calendar_picker |
| License | OPL-1 |
🗓 Hijri (Islamic) Calendar Picker
Native Hijri date picker widget for Odoo date & datetime fields
Stores values as Gregorian (ISO) dates — displays and picks using the full Hijri calendar with real moon-sighting adjustments.
Key Features
Hijri Popup Calendar
Click any date or datetime field to open a full Hijri month grid. Navigate months and years with arrow buttons or by clicking the month / year header to jump directly.
Moon-Sighting Adjustments
Store the actual Gregorian start date of any Hijri month (as announced by moon-sighting). The widget uses these corrections for pixel-perfect Hijri ↔ Gregorian conversion.
Auto-Fetch from Aladhan.com
A built-in wizard and a monthly scheduled cron fetch official Umm al-Qura start dates from the free Aladhan.com API — no manual entry needed.
Arabic & Eastern Numerals
Display dates in Eastern Arabic-Indic numerals (٠١٢٣٤٥٦٧٨٩) or standard Western digits. Configurable per field via widget options.
Gregorian Storage
The underlying field value is always a standard Gregorian date. No schema changes, no migration risk — works with any existing date or datetime field.
Smart Caching
Adjustments are fetched once per session and cached client-side with a 5-minute TTL. Cron-added adjustments appear automatically without a page reload.
Month & Year Navigation
Click the month name → 4×3 month grid
Click the year → 3×4 year grid (12 years per page)
Hijri Date Adjustments
- ✅ One record per Hijri month — stores the actual moon-sighted start date
- ✅ Month length (29 or 30 days) auto-computed from start date gap
- ✅ Auto-fetch wizard — pick a Hijri month, click Fetch, done
- ✅ Scheduled cron — runs daily, creates record automatically on the first day of each new Hijri month
- ✅ ±3-day sanity check prevents accidental wrong entries
Auto-Fetch from Aladhan.com
Select the Hijri year & month → click Fetch from API → the adjustment record is created automatically using Aladhan.com (Umm al-Qura, free, no API key required).
How to Use
1 — Apply the widget in any view
<field name="date_of_birth"
widget="hijri_date"/>
<field name="appointment_date"
widget="hijri_date"
options="{
'arabic_numerals': true,
'show_gregorian': true
}"/>
2 — Configure adjustments
Go to Settings → Hijri Calendar → Hijri Date Adjustments to view, add, or edit moon-sighting corrections.
3 — Auto-populate
Use Settings → Hijri Calendar → Auto-fetch from Online API to fetch a single month, or let the built-in daily cron handle it automatically.
Technical Details
| Odoo Version | 19.0 |
|---|---|
| Depends | base, web |
| Field types supported | date, datetime |
| Storage | Standard Gregorian (ISO 8601) |
| Algorithm | Tabular Islamic calendar + adjustments |
| External API | Aladhan.com (optional, free) |
Widget options
| Option | Default | Description |
|---|---|---|
arabic_numerals | true | Use Eastern Arabic-Indic digits |
show_gregorian | false | Show Gregorian day number in each cell |
Help & support
If you need changes, contact mhajjar1978@hotmail.com or open a ticket in your internal tracker.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module