Sunday, January 25, 2026
1 change · saas-19.1
Enhancements to existing features
This update enhances the Intervat integration by automatically refreshing refresh tokens every two days, ensuring a continuous connection. It also addresses a key issue where accounting firms submitting VAT returns weren't correctly identified, now allowing for accurate data transmission. Small fixes were also implemented for stability.
Original PR description
### 1) Refresh Token & Cron Intervat API's provide use both access & refresh tokens. As long as we keep a valid refresh token, we can keep the connection opened by requesting a new refresh token.…
### 1) Refresh Token & Cron Intervat API's provide use both access & refresh tokens. As long as we keep a valid refresh token, we can keep the connection opened by requesting a new refresh token. Currently, we force the connection to close after 4 hours, but it's too short. This commit goes to the opposite way, and keep the connection opened as long as the user wants. As we need to keep a valid refresh token, we add a cron who execute once each 2 days to fetch new refresh tokens. Also, to prevent being stuck, add a new button in res settings to manually close the connection. ### 2) Accounting firm When submitting vat return to Intervat API, we have 2 situations: 1. The user submit his own declaration 2. An accounting firm submit the declaration for the client The current implementation works nicely with situation 1, but not 2. The problem is when starting the authentication proccess, we give Intervat a company number, the current company number. But when an accounting firm is set on the company, we should use the VAT number of the firm instead of the current company, as it will be an accountant from the accounting firm who will submit the return. So this commit try to find the accounting firm VAT before the current company VAT for the authentication proccess. Also, add a new settings in Intervat settings to change the accounting firm from there. ### 3) Small fixes Small fixes done for corner cases, see commits messages. task-5420287,5500052,5495079 Forward-Port-Of: odoo/enterprise#104572