This module provides real-time integration of the Central Bank of Venezuela (BCV) exchange rates into Odoo. It fetches the official USD and EUR rates daily and updates the corresponding currencies in Odoo. The module also adds a convenient systray indicator for quick access to current rates.
-
Automatic Exchange Rate Update
Fetches USD and EUR rates from the BCV website and updates the corresponding currency rates in Odoo. -
Systray Display
Shows USD and EUR rates in the Odoo systray with 2 decimal precision. Clicking on a currency opens its form view. -
Cron Job for Daily Updates
Automatically updates rates every day using a scheduled cron job, ensuring the system always has the latest rates. -
Inverse Rate Support
Returnsinverse_company_rateto align with Odoo's accounting conventions. -
Base Currency Awareness
Rates are displayed relative to the company’s base currency symbol.
The BCV Exchange Rate module integrates official exchange rates from the Central Bank of Venezuela (BCV) into Odoo. It ensures that USD and EUR currency rates are always up-to-date and provides a convenient systray indicator for quick reference. The module is designed to work seamlessly with Odoo’s currency management and supports daily automatic updates through a scheduled task.
- Retrieves official USD and EUR exchange rates from the BCV website.
- Handles potential connection errors and logs any issues encountered during the fetch process.
- Returns the rates along with the current date.
- Updates the
res.currency.raterecords for USD and EUR using the fetched rates. - Checks if a rate for the current day already exists to avoid duplicate entries.
- Converts rates to
inverse_company_rateto align with Odoo’s accounting conventions. - Logs rate creation events for traceability.
- Adds a systray component displaying current USD and EUR rates.
- Shows rates with two decimal precision, making them precise and easy to read.
- Clicking on a currency opens its corresponding form view for further inspection or editing.
- Runs daily to automatically fetch and update exchange rates.
- Ensures that the system always has the most recent official rates without manual intervention.
- Can be configured to adjust the interval for different business needs.
- Rates are updated relative to the company’s base currency.
- Supports multi-company setups by associating rates with the correct company context.
- Any errors during fetching or updating are logged for troubleshooting.
- Prevents system failure in case the BCV website is temporarily unreachable.
flowchart TD
A[Start: Scheduled Cron Job / Manual Trigger] --> B[Fetch USD & EUR rates from BCV website]
B --> |Success| C[Check if rates for today already exist in Odoo]
B --> |Failure| E[Log error and stop process]
C --> |Exists| F[Skip creation, log info]
C --> |Not Exists| D[Create new res.currency.rate records]
D --> G[Update systray component with latest rates]
F --> G
G --> H[End]
- Reliable Exchange Rates: Automatically fetches official USD and EUR rates from BCV.
- Accuracy in Transactions: Ensures financial operations use up-to-date rates.
- Quick Reference: Displays current rates directly in the Odoo systray for easy access.
- Automation: Reduces manual updates and potential human errors.
- Multi-Company Support: Associates rates with the correct company in multi-company setups.
- Traceability: Logs all updates and errors for auditing and troubleshooting.
-
Install the Module
- Add the module to your Odoo addons directory.
- Update the apps list and install the module via Odoo interface.
-
Automatic Exchange Rate Updates
- The module automatically fetches USD and EUR exchange rates from BCV every minute.
- Rates are stored in the system and linked to the current company.
-
Systray Widget
- Once installed, a systray widget displays the current USD and EUR rates.
- Click on each currency in the dropdown to open its detailed currency form view.
-
Manual Update
- You can trigger a manual update of the exchange rates by executing the scheduled action or calling the
_update_exchange_rates()method onres.currency.
- You can trigger a manual update of the exchange rates by executing the scheduled action or calling the
-
Multi-Company Support
- Rates are stored per company, ensuring correct values in multi-company environments.
-
Error Logging
- Any errors during fetching of rates are logged for monitoring and troubleshooting purposes.
For maintenance and support, please contact soltecferr or refer to the module's repository for updates and issue tracking.