Monday, August 25, 2025
1 change · master
Enhancements to existing features
Accounting document synchronization is now enabled automatically when Documents Accounting is installed. New and existing journals get the needed folders, tags, and sync settings without manual setup, making accounting documents easier to organize consistently.
Original PR description
We enable the synchronization of document account by default, and we create automatically the journal synchronization configuration along with the corresponding folder and tag when a journal is…
We enable the synchronization of document account by default, and we create automatically the journal synchronization configuration along with the corresponding folder and tag when a journal is created.
We also create all the synchronization configuration of the existing journal when documents_account is installed.
Notes:
- we do the configuration of the journal synchronization in sudo because the user creating the journal has not necessary access to document.
- we transfer the translation of the journal type to the folder name, but it only transfers the installed language so to benefit from it, languages must be activated before documents_account is installed.
- we also transfer the translation of the journal name to the documents tags. But as we can only add translations after the creation of the journal where the auto creation of the settings are performed, it will only benefit when installing documents_account after having activated multiple language and added translation to the journal names.
[IMP] documents_account: remove accounting sync option
The user can no longer disable the accounting synchronization with document when documents_account is installed.
Note: Following the change of _get_default_folder in account_reports.export.wizard where we just return the account_folder_id of the company, we set precompute to True for the field account_folder_id of company to ensure a folder is set by default. Note that the field is not required on the model but well in the settings view. test failing without that change: account_reports:TestAllReportsGeneration.test_generate_all_export_files
[IMP] documents{_account}: prevent document warning in the tests
In document._prepare_create_values, we emit a warning and set the owner to False when the owner of the document to be created is not active. Now that we have enabled the document account synchronization as soon as document_account is installed, we get that warning in lot of account test. To avoid those warning, we set upstream the owner to False when the owner is not active.
Co-authored by: Stephane Debauche <std@odoo.com>
[IMP] documents_account: disable documents sync during account test
To avoid a lot of test to fail or emit warning in account (not in documents_account) following the enabling of the account document synchronization by default, we disable the document account synchronization during the account test and re-enable it for documents account test.
We also modify the tests because they were expecting that no configurations for journal synchronization were set up which is no longer the case.
Task-4873102