# Account Online Synchronization Patch This module is a clean customization designed to prevent the Odoo single-threaded Werkzeug server from freezing, hanging, or entering infinite loops when accessing the Accounting Dashboard in non-production, testing, staging, or local development environments. ## Problem Statement When the Odoo Accounting App/Dashboard is loaded, the frontend makes standard RPC requests to the `fetch_online_sync_favorite_institutions` method on the `account.journal` model for each cash/bank journal. By default, Odoo's core `account_online_synchronization` module executes synchronous HTTP calls to `odoofin.com` with a 60-second timeout. On testing, staging, or duplicated local database instances, or in environments with restricted external internet access: 1. These synchronous requests hang. 2. Because Odoo runs single-threaded in standard development and test modes, the entire server process blocks. 3. This creates sequential gateway timeouts (HTTP 502/504), heavy browser lags, and infinite loading loops. ## Solution To resolve this issue cleanly **without modifying core/enterprise source code**, this module applies standard Odoo model inheritance: * **Inherited Model**: `account.journal` * **Mechanism**: Overrides `fetch_online_sync_favorite_institutions()`. * **Behavior**: Checks the `database.is_neutralized` configuration parameter. If the database is neutralized (which is typical for test/staging clones), it returns an empty list `[]` immediately without making any outbound external network requests. If the database is not neutralized (i.e. production), it forwards the execution to the parent module (`super()`). ## Installation ### Dependencies * `account_online_synchronization` (Enterprise module) ### Auto-installation This module is configured with `'auto_install': True` and `'depends': ['account_online_synchronization']`. It will automatically install and activate as soon as the base online sync module is present in the database registry. ### Manual CLI Installation To explicitly register and install the module via command line: ```bash ./odoo-bin -c odoo.conf -d -i account_online_sync_patch --stop-after-init ``` ## Changelog ### v19.0.1.0.0 * Initial release. * Added `account.journal` override for `fetch_online_sync_favorite_institutions` to bypass external connections on neutralized databases.