Hijri & Shamsi Calendar
for Every Screen in Odoo
One toggle in General Settings carries Form, List, Kanban, Pivot, Graph, Search, Chatter, printed reports, and exports from Gregorian to Islamic Lunar or Afghan Solar time — and back, instantly. Stored dates never change, only their display.
Developed by Mohammad Hameed Masjedi — Software Engineer · Economist · Odoo ERP Specialist · Hameedmasjedi45@gmail.com
Overview
Adds full Hijri (Islamic Lunar) and Shamsi (Afghan Solar Hijri) calendar support to Odoo, alongside the standard Gregorian calendar. A single toggle in General Settings switches Form, List, Kanban, Pivot, Graph, Search, Chatter, printed PDF reports, and Excel/CSV exports to the selected calendar, system-wide — with no per-view configuration required. Unchecking the toggle reverts everything to Gregorian instantly; the underlying stored date is never modified, only its display.
Nine Ways It Reaches Every Corner of Odoo
Global Calendar Toggle
One setting switches Gregorian / Hijri / Shamsi across every Date and Datetime field, on screen and in print — no per-view setup.
Per-Field Widgets
widget="hijri_date" and widget="hijri_datetime" opt individual fields in, with a full calendar-style picker.
True Group By Buckets
List, Pivot, Graph and Search Panel group by real Hijri/Shamsi periods, computed at the ORM level — not a relabelled Gregorian range.
Calendar-Aware Search
Search Bar typing, Custom Filters, and period shortcuts (This Month / Quarter / Year) understand the active calendar.
PDF Reports & Portal
Sale Orders, Invoices, Purchase Orders and Deliveries print and preview in the active calendar, including the Customer Portal.
Excel & CSV Export
Exported spreadsheets render dates in the active calendar, matching exactly what's on screen.
Chatter & Activities
Chatter timestamps, field-tracking change logs, and Activity due dates all display in the selected calendar.
Moon-Sighting Adjustment
Manual ±1 day correction entries per Hijri month, so local sighting announcements don't require a blanket global shift.
Dual Date Display
Show the local calendar alongside Gregorian in the same field, with a company-level override for this display option.
Settings & Calendar Toggle
Go to Settings › General Settings › Hijri Calendar to choose Hijri or Shamsi as the active calendar, turn on dual display, and manage per-month moon-sighting adjustments — all from one screen.
Form, List & Group By
Every Date and Datetime field across Odoo renders in the active calendar. Group-by buckets in List, Pivot and Graph use true Hijri/Shamsi periods, not relabelled Gregorian ranges.
List View — Hijri
List View — Shamsi
Group By — Shamsi Periods
Chatter, Activities & Dashboards
Message timestamps, activity due dates, and chart/dashboard date labels elsewhere in Odoo all follow the active calendar automatically — including the Accounting Dashboard's journal graph labels.
Chatter
Invoicing Dashboard
Reports, Portal & Exports
Printed PDF reports, Customer Portal previews, and Excel/CSV exports all render dates in the active calendar — no additional setup.
PDF Invoice
Customer Portal
Excel Export
Moon-Sighting Adjustment Entry
Why Choose This Module?
One Toggle, Whole System
Install the module, choose a calendar in Settings. Every screen in every installed app switches automatically — no field-by-field, view-by-view setup.
Non-Destructive
The stored Gregorian date is never modified — only its display. Switch back to Gregorian at any time with zero data loss.
Comprehensive Coverage
Form, list, kanban, pivot, graph, search, chatter, PDF, portal, Excel/CSV, Accounting Dashboard — every place a date appears.
Multilingual & Multi-Company
Arabic, English and Dari month names ship built in. Each company can override the dual-display option independently.
Technical Highlights
- Hijri conversion uses the Umm al-Qura calendar via the
hijridatePython package. - Shamsi conversion uses the
jdatetimePython package. - ORM-level Group By — Hijri/Shamsi buckets are computed server-side, not faked with relabelled Gregorian ranges.
- Server-side QWeb report overrides keep PDF and Portal rendering in sync with the on-screen calendar.
- Clear dependency errors. If a required Python package is missing, the Settings page shows an actionable message instead of failing silently.
- Company > System priority for the dual-display option, resolved consistently everywhere a date is rendered.
Requirements
This module requires the following Python packages on the Odoo server:
pip install hijridate jdatetime
This is a free app — licensed under the GNU Lesser General Public License v3.0 (LGPL-3).
Installation
- Install the required Python packages on the Odoo server:
pip install hijridate jdatetime. - Place the
hijri_shamsi_calendarfolder in your Odoo addons path and restart the server. - From Apps, click Update Apps List, search for "Hijri & Shamsi Calendar", and install.
- Go to Settings › General Settings › Hijri Calendar and choose Hijri or Shamsi.
- Save. All dates across the system now render in the selected calendar.
Compatibility
| Item | Supported |
|---|---|
| Odoo Version | 17.0 |
| Edition | Community & Enterprise |
| Languages | Arabic, English, Dari (Afghan Persian) |
| Calendars | Gregorian, Hijri (Islamic Lunar), Shamsi (Afghan Solar Hijri) |
| Multi-Company | Yes — per-company dual-display override |
| Database | PostgreSQL (Odoo standard) |
Known Limitations
- Some specialised per-field options on the standard date widget (e.g. a future-date warning) aren't reproduced while the global toggle is on — use the per-field widget instead if you need them.
- The active calendar is one system-wide setting; only the dual-display option can be overridden per company.
- Grouping by two coarse date fields at once in the same Pivot/List call only re-buckets the first field.
Need Help or Customization?
For support, customization, or implementation enquiries, reach out to Mohammad Hameed Masjedi — Software Engineer | Economist | Odoo ERP Specialist | Accounting & Financial Management Expert.
LinkedIn: linkedin.com/in/hameed45
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 3142 |
| Technical Name |
hijri_shamsi_calendar |
| License | LGPL-3 |
| Website | https://www.linkedin.com/in/hameed45 |
Please log in to comment on this module