Afghanistan - Shamsi Calendar
by Faridullah Qaderi & Mohammad Hameed Masjidi https://www.mcit.gov.af$ 120.58
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 2135 |
| Technical Name |
l10n_af_calendar |
| License | OPL-1 |
| Website | https://www.mcit.gov.af |
Afghanistan â Shamsi (Jalali) Calendar
Full Shamsi calendar support for Farsi (fa_IR) and Pashto (ps_AF) users
Developed by MCIT â Ministry of Communication and Information Technology | www.mcit.gov.af
â Odoo Community â Odoo Enterprise
Overview
This module brings a fully language-aware Shamsi (Solar Hijri / Jalali) calendar to Odoo 17. It activates automatically when the user's language is set to Farsi (fa_IR) or Pashto (ps_AF), and leaves all other languages completely unchanged on the standard Gregorian calendar. No configuration needed â install and switch language.
ð Date Picker â Jalali Month & Year Navigation
The date picker fully converts to Shamsi. Month names, year display, and year-range navigation all use Jalali values. Dari and Pashto month names switch automatically with the active language.
Dari â Month view (ØÙ Ù Û±Û´Û°Ûµ)
Pashto â Month view (کب Û±Û´Û°Û´)
Year range view (Jalali decade)
ðï¸ Kanban & List Views â Shamsi Dates Everywhere
All date fields in list and kanban views display in Shamsi. Invoice dates, due dates, and activity timestamps all convert automatically.
ð Custom Filters â Shamsi Date Input
Users enter dates in Shamsi format in custom filters. The filter chip in the search bar also displays the Shamsi date.
Custom filter dialog â Shamsi date input (Û±Û´Û°Ûµ/Û°Û±/Û±Û±)
Filter result with Shamsi date chip
ð Group By â Jalali Year, Quarter, Month, Week, Day
Group By labels fully convert to Shamsi for both Dari and Pashto. Nested grouping (year â quarter â month â week â day) shows the correct Jalali label at every level in both languages.
Group By â Dari (ربع ÚÙØ§Ø±Ù Û±Û´Û°Û´Ø ØÙØªØ ÙÙØªÙ)
Group By â Pashto (Ú ÙÙØ±Ù ٠ربع Û±Û´Û°Û´Ø Ú©Ø¨Ø Ø§ÙÙÛ)
ð¬ Chatter & Log Notes â Shamsi Timestamps
All chatter messages, log notes, and activity entries display their timestamps in Shamsi â including the grouped date headers (e.g. ØÙ Ù Û±Û° Û±Û´Û°Ûµ). Works in both Dari and Pashto.
Chatter â Dari (ØÙ Ù Û±Û° Û±Û´Û°Ûµ)
Chatter â Pashto (کب Û±Û¸ Û±Û´Û°Û´)
ð PDF Reports â Shamsi Dates in Printed Documents
Built-in Odoo PDF reports (invoices, receipts, etc.) and custom QWeb reports automatically print dates in Shamsi format. The printed date always matches exactly what the user sees on screen.
ð Excel Export â Shamsi Dates in Spreadsheets
Excel exports convert all date columns to Shamsi format automatically. Both the date column and separate Jalali date columns are supported.
ð Charts & Pivot Tables â Shamsi Labels
Bar charts, pie charts, and pivot tables all display Shamsi date labels in their legends, axes, and row/column headers.
Bar chart â Shamsi date in legend (ØÙ Ù Û±Û° Û±Û´Û°Ûµ)
Pie chart â Shamsi labels
Pivot table â Jalali year & quarter rows
Afghan Month Names
| # | Dari (fa_IR) | Pashto (ps_AF) | Gregorian approx. |
|---|---|---|---|
| Û± | ØÙ Ù | ÙØ±Û | Mar â Apr |
| Û² | Ø«ÙØ± | غÙÙÛ | Apr â May |
| Û³ | Ø¬ÙØ²Ø§ | غبرګÙÙÛ | May â Jun |
| Û´ | سرطا٠| ÚÙÚ«Ø§Ú | Jun â Jul |
| Ûµ | اسد | Ø²Ù Ø±Û | Jul â Aug |
| Û¶ | Ø³ÙØ¨ÙÙ | ÙÚÛ | Aug â Sep |
| Û· | Ù ÛØ²Ø§Ù | تÙÙ | Sep â Oct |
| Û¸ | Ø¹ÙØ±Ø¨ | ÙÚÙ | Oct â Nov |
| Û¹ | ÙÙØ³ | ÙÛÙØ¯Û | Nov â Dec |
| Û±Û° | Ø¬Ø¯Û | ٠رغÙÙ Û | Dec â Jan |
| Û±Û± | دÙÙ | سÙÙØ§ØºÙ | Jan â Feb |
| Û±Û² | ØÙت | کب | Feb â Mar |
Technical Notes
- No third-party Python libraries required. All Jalali date arithmetic is implemented in pure Python and JavaScript using the same algorithm â UI, PDF, and Excel always show identical dates.
- Compatible with Odoo 17.0.
- Activates only for
fa_IRandps_AF. All other languages remain on the Gregorian calendar, fully unaffected. - Patches
babel.dates.format_datefor server-side formatting (PDF reports, group-by labels, pivot tables). - Patches Luxon's
DateTime.prototype.toFormatfor all client-side date rendering. - Invoice sequence numbering resets at Jalali New Year (Nowruz).
Installation
- Download and extract the module to your Odoo
custom_addonsdirectory. - Restart the Odoo server.
- Go to Apps, search for Afghanistan - Shamsi Calendar, and click Install.
- Go to Settings â Users â Preferences and set your language to Persian (Afghanistan) or Pashto.
- Refresh your browser â all dates now display in the Shamsi calendar.
License
This module is published under the OPL-1 (Odoo Proprietary License). A valid license is required for each production instance. Purchase your license on the Odoo App Store.
Support & Contact
Developed and maintained by the Ministry of Communication and Information Technology (MCIT), Afghanistan.
| ð§ Email: | faridullah.qaderi@mcit.gov.af |
| ð Phone: | +93 788 707 479 |
| ð Website: | www.mcit.gov.af |
| ð Country: | Afghanistan ð¦ð« |
| ð¨âð» Authors: | Faridullah Qaderi & Mohammad Hameed Masjidi |
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