Daily updates from Odoo
Saturday, January 25, 2025
3 changes · master
Miscellaneous changes
[FIX] documents, documents_hr: fix company folder protection How to reproduce: - install documents_hr - In Document, create a folder prjComp2 in /Marketing/Brand 2 - create a second company: SecondCompany - Select SecondCompany - Activate centralization of document for HR and select prjComp2 folder - Log as Marc Demo and delete the folder Brand 2 (Move to Trash + delete) There is no error while this folder should have been protected by the method _raise_if_used_folder called when arc
Original PR description
[FIX] documents, documents_hr: fix company folder protection How to reproduce: - install documents_hr - In Document, create a folder prjComp2 in /Marketing/Brand 2 - create a second company:…
[FIX] documents, documents_hr: fix company folder protection How to reproduce: - install documents_hr - In Document, create a folder prjComp2 in /Marketing/Brand 2 - create a second company: SecondCompany - Select SecondCompany - Activate centralization of document for HR and select prjComp2 folder - Log as Marc Demo and delete the folder Brand 2 (Move to Trash + delete) There is no error while this folder should have been protected by the method _raise_if_used_folder called when archiving or deleting a folder. The cause is that Marc user doesn't have access to SecondCompany and as the check is not done in sudo in _raise_if_used_folder, the folder is not identified as a folder to be protected. We solve the issue by running the check in sudo. Technical note: the protection mechanism is defined in the documents app but tested in documents_hr because there is no company folder defined in documents that could be used in a test. [FIX] documents,documents_project: fix document deletion How to reproduce (Move to the Trash): - Install documents_project - Remove any access to the project folder (except to Mitchel Admin) - Login as Marc Demo - Upload a file in Marketing - Move that file to the Trash You get an access error while you should be able to move that document to the Trash. How to reproduce (Delete): - install documents_project - Login as Marc Demo - Upload a file in Marketing - Move it to the Trash - Remove any access to the project folder (except to Mitchel Admin) - As Marc Demo, go to the Trash and delete the document You get an access error while you should be able to delete that document. We solve the problem by doing the check in sudo (in unlink_except_project_folder). Technical note: We haven't done that test in documents (where there are already delete tests) because we had to change the test so that they are executed after all the modules are installed and that cause query count issue in performance tests. Task-4480581 Forward-Port-Of: odoo/enterprise#77632 Forward-Port-Of: odoo/enterprise#77162
1. [FIX] documents: keep translations when embedding action When creating an embedded action from a server action, only one language was copied. Note that we are using `_get_stored_translations` instead of `get_languages` to identify values to write as a simple method to avoid storing too much unnecessary data as possible (e.g., 100 languages installed but only `en_US` on the record). 2. [IMP] documents_account: prepare actions journal customization This can be helpful to guide l
Original PR description
1. [FIX] documents: keep translations when embedding action When creating an embedded action from a server action, only one language was copied. Note that we are using `_get_stored_translations` instead of `get_languages` to identify values to write as a simple method to avoid storing too much unnecessary data as possible (e.g., 100 languages installed but only `en_US` on the record). 2. [IMP] documents_account: prepare actions journal customization This can be helpful to guide less technical users. Task-4486261 Forward-Port-Of: odoo/enterprise#77205
During this refactoring https://github.com/odoo/enterprise/commit/d023d914dce1b23bf321252fb844c780e831f003 it seems the impacted tax grid were broken. opw-4418348 Forward-Port-Of: odoo/enterprise#76513
Original PR description
During this refactoring https://github.com/odoo/enterprise/commit/d023d914dce1b23bf321252fb844c780e831f003 it seems the impacted tax grid were broken. opw-4418348 Forward-Port-Of: odoo/enterprise#76513