-
- Downloads
[FIX] stock_account: search journal by code
Problem: When the user installs Inventory and uninstalls it, the Inventory Valuation journal still exists in the database. The user is unable to re-install Inventory if the database not in English. Example: Client's db is in Spanish In method "_configure_journals" , it searches for the Inventory Valuation journal based on the name translated in Spanish. However, the journal "Inventory Valuation" is not translated to Spanish in the database. Therefore, no journal would be found and an error "Journal codes must be unique per company" will be thrown because it will try to create another "Inventory Valuation" journal with code 'STJ'. Solution: Since journal codes have to be unique, it is more logical to search for an existing journal based on its code instead of the name since it is possible to have multiple journals with the same name but different codes. opw-3277498 closes odoo/odoo#119023 X-original-commit: 680ff54c Signed-off-by:Tiffany Chang <tic@odoo.com>
Please register or sign in to comment