[19.0][MIG] dms: Migration to 19.0#25
Open
dnplkndll wants to merge 172 commits into
Open
Conversation
(cherry picked from commit db36c30)
(cherry picked from commit b5a0fed)
(cherry picked from commit 5501c3e)
(cherry picked from commit 00d5d5c)
(cherry picked from commit 23baf65)
(cherry picked from commit 50a04a1)
(cherry picked from commit d4f3455)
(cherry picked from commit a370072)
(cherry picked from commit 5a1c4b6)
(cherry picked from commit 2c50c47)
(cherry picked from commit 649fbf2)
(cherry picked from commit 3a1e3d9)
(cherry picked from commit 23d7c9a)
(cherry picked from commit 44e5aaa)
(cherry picked from commit daa95d1)
(cherry picked from commit 0a89da2)
(cherry picked from commit 9c69490)
(cherry picked from commit b184eaa)
(cherry picked from commit 7fbbf9b)
…ails, preview (cherry picked from commit 1f74bb1)
(cherry picked from commit a1e29b9)
versions of muk_dms than 12.0.2.0.0. Tested from 1.2.4 version. (cherry picked from commit 447f8c3)
(cherry picked from commit 32e69d2)
(cherry picked from commit 6e92a6f)
(cherry picked from commit 8f981ae)
In v13, this test is programmed in such a way that the demo user is supposed to be able to copy that subdirectory: https://github.com/OCA/dms/blob/c3f802db43362127e70d8c7b4987fb71d4c1f01c/dms/tests/test_directory.py#L40 However, in OCA#7 that test was modified indicating that demo user didn't have permissions to do that: https://github.com/OCA/dms/blob/e3b6d8d24534f2a68bfb88e310cc70cefe46bb64/dms/tests/test_directory.py#L39 Rolling back that change to ensure premissions remain the same in both versions of the module. Also changing the directory to test to ensure it contains no SVG files, whose detection seems to differ among environments, and which have some specific permission restrictions that can make the modified test fail or pass. @Tecnativa TT25645 (cherry picked from commit bb94524)
(cherry picked from commit 5a3dc12)
…tions (cherry picked from commit 38d8463)
(cherry picked from commit 8783a1a)
(cherry picked from commit ba27aa3)
Currently translated at 100.0% (354 of 354 strings) Translation: dms-18.0/dms-18.0-dms Translate-URL: https://translation.odoo-community.org/projects/dms-18-0/dms-18-0-dms/it/ (cherry picked from commit b82c5ad)
Currently translated at 100.0% (359 of 359 strings) Translation: dms-18.0/dms-18.0-dms Translate-URL: https://translation.odoo-community.org/projects/dms-18-0/dms-18-0-dms/it/ (cherry picked from commit 547eaaf)
Currently translated at 100.0% (359 of 359 strings) Translation: dms-18.0/dms-18.0-dms Translate-URL: https://translation.odoo-community.org/projects/dms-18-0/dms-18-0-dms/it/ (cherry picked from commit 0a7e660)
(cherry picked from commit 34b922d)
… is applied correctly. Before these changes, the domain was never applied to search by the parent, so all subfolders were being displayed instead of only the direct children of the selected one. After making the changes, only a single level of folders is shown, without displaying all descendant folders. (cherry picked from commit 12c54a9)
Currently translated at 89.6% (322 of 359 strings) Translation: dms-18.0/dms-18.0-dms Translate-URL: https://translation.odoo-community.org/projects/dms-18-0/dms-18-0-dms/es/ (cherry picked from commit 687ec9c)
The _check_access_dms_record method uses self.search(domain) to verify write permissions. However, search() applies active_test=True by default, which excludes archived records (active=False). This means when a user tries to unarchive a file via toggle_active(), the write permission check cannot find the archived record in the search results, causing an AccessError even when the user has full write permissions through DMS access groups. Fix: add active_test=False context to include archived records in the permission check search. (cherry picked from commit 86cc746)
(cherry picked from commit e5f4b46)
Currently translated at 100.0% (359 of 359 strings) Translation: dms-18.0/dms-18.0-dms Translate-URL: https://translation.odoo-community.org/projects/dms-18-0/dms-18-0-dms/ar/ (cherry picked from commit 9605b5b)
Currently translated at 99.7% (358 of 359 strings) Translation: dms-18.0/dms-18.0-dms Translate-URL: https://translation.odoo-community.org/projects/dms-18-0/dms-18-0-dms/es/ (cherry picked from commit 69f82dc)
Currently translated at 100.0% (358 of 358 strings) Translation: dms-18.0/dms-18.0-dms Translate-URL: https://translation.odoo-community.org/projects/dms-18-0/dms-18-0-dms/it/ (cherry picked from commit b5c4821)
bdc88aa to
d911243
Compare
d911243 to
b628ef8
Compare
When an incoming email is processed for a dms.directory alias configured
with "Unpack Emails as: Subdirectory" (alias_process='directory'),
message_new() builds the new subdirectory name from the email subject by
calling ir.http._slug() on a plain string. _slug() expects a record or a
(id, name) tuple, so it raises:
ValueError: too many values to unpack (expected 2)
and the incoming email cannot be ingested. The intent is simply to
slugify the subject string, which is what ir.http._slugify() does.
Use it instead.
b628ef8 to
171bd86
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of
dmsfrom 18.0 to 19.0.Two commits:
_search/_check_access(as coremail.messagedoes) and drops the computed-permissionir.rules. Can be dropped if too large for the MIG — the same record-level access tests pass with or without it.