| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 241 |
| Technical Name |
currency_rate_bam_community |
| License | LGPL-3 |
| Website | https://www.softarena.ma |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 241 |
| Technical Name |
currency_rate_bam_community |
| License | LGPL-3 |
| Website | https://www.softarena.ma |
Bank Al-Maghrib â Community edition
Updates exchange rates in Odoo from the official Bank Al-Maghrib API
(Cours Virement). Designed for databases that do not include the Enterprise
Live Currency application (currency_rate_live).
Key features
- Settings UI: API URL,
Ocp-Apim-Subscription-Key, timeout, and an automatic update toggle. - Automation: optional daily cron for companies with auto-update enabled.
- Manual run: Update now button on settings.
- Parsing: supports the official JSON list format and a legacy JSON object shape as fallback.
Requirements
- Odoo 19.0 with Accounting.
- Multi-currency enabled (standard Accounting settings).
- External service: a valid Bank Al-Maghrib API subscription key (Azure API Management).
- Network: outbound HTTPS access to the configured API endpoint.
How to obtain an API subscription key
To use Bank Al-Maghrib web services, you must register on the official developer portal. The portal states that users need to subscribe free of charge for an API key to access the services.
-
Create an account on the API portal
Open the developer helpdesk portal at
https://apihelpdesk.centralbankofmorocco.ma(copy this address into your browser) and click Sign up. Complete the registration form and validate your e-mail address. -
Log in and subscribe to a product
After your account is active, sign in and select the product that matches the service you need (for example, Foreign exchange market / Marché des changes for transfer / virement rates). Developer documentation explains that you obtain unique keys through Bank Al-Maghribâs developer services portal.
-
Retrieve your key
Once subscribed to the product, a subscription key is generated in your developer area (often a primary and a secondary key). You must send this key on every API call using the HTTP header
Ocp-Apim-Subscription-Key, or using thesubscription-keyquery parameter; otherwise the API typically responds with 401 Unauthorized.
With that key, you can query the CoursVirement endpoint for transfer rates and paste the same value into
Odooâs Ocp-Apim-Subscription-Key field in settings.
Odoo Apps compliance note
This module is meant for Community-style deployments without currency_rate_live.
If you use Odoo Enterprise with Live Currency, use the companion
Enterprise provider module from the same publisher for the supported workflow.
Screenshot (illustrative)
Support
For purchase-related issues and configuration help, contact: helpdesk@softarena.ma
BAM FX Rates (Community)
Overview
This module updates res.currency.rate using the official Bank Al-Maghrib API, for databases without the Enterprise Live Currency application (currency_rate_live).
Requirements
- Odoo 19.0
- Module: account
- Multi-currency enabled
- A valid Bank Al-Maghrib API subscription key (Ocp-Apim-Subscription-Key)
- HTTPS egress to the Bank Al-Maghrib API host
Configuration
Settings → Accounting → Currencies: configure URL, key, timeout, enable automatic updates if desired, and use Update now for a manual run.
Support
See the support field in __manifest__.py (Odoo Apps).
Please log in to comment on this module