Saturday, July 5, 2025
1 change · master
Resolved issues and error corrections
The Winbooks import now handles multiple journals whose original codes are longer than Odoo's limit and start the same way. This prevents some journals from being skipped during Belgian accounting history imports, making imported records more complete and reliable.
Original PR description
**Steps to reproduce:** - Install accountant, l10n_be and account_winbooks_import - Switch to a Belgian company (e.g. BE Company CoA) - Go to "Accounting / Configuration / Settings" - Click on…
**Steps to reproduce:** - Install accountant, l10n_be and account_winbooks_import - Switch to a Belgian company (e.g. BE Company CoA) - Go to "Accounting / Configuration / Settings" - Click on "Import (for full history)" in "Accounting Import" section - Click on "Import WBK" in "Winbooks" section - Upload a Winbooks file containing several journals having their "DBKID" value longer than 5 characters with the 5 first characters being identical (e.g. "SALES001", "SALES002",...) - Import **Issue:** Some journals are not imported. **Cause:** The code of a journal is limited to 5 characters and is unique per company. When a code is longer than 5 characters, only the 5 first characters are kept. In this case, several journals to create have the same 5 first characters. Therefore, only one of them is created. **Solution:** If the code of a journal to create has the same first 5 characters of a journal that has already been created (and the same last 5 characters), we use a generic code formatted with a starting "*" char followed by a number that is incremented. This format allows to quickly find it if we want to change its value once imported. This solution is limited to 9999 journals that have a code that can starts with the same 5 characters than another journal, but it should be more than enough. opw-4812655 Forward-Port-Of: odoo/enterprise#86068