Skip to content

[19.0][MIG] dms — minimal defensible diff (TEST)#22

Closed
dnplkndll wants to merge 170 commits into
19.0from
19.0-mig-dms-test
Closed

[19.0][MIG] dms — minimal defensible diff (TEST)#22
dnplkndll wants to merge 170 commits into
19.0from
19.0-mig-dms-test

Conversation

@dnplkndll

Copy link
Copy Markdown

Internal CI verification for OCA#475 diff-minimization (NOT upstream). Drops non-19.0-required churn (breadcrumb refactor, Command.set, index=btree, U2 static fields, removed filter_domain/# Search comment, restored target=inline) per the per-hunk defense doc; keeps only required 19.0 changes + review fixes. Code identical to the prior CI-green HEAD minus those reverts.

Mathias Markl and others added 30 commits May 29, 2026 16:37
(cherry picked from commit db36c30)
(cherry picked from commit b5a0fed)
(cherry picked from commit 97c5202)
(cherry picked from commit 23baf65)
(cherry picked from commit 50a04a1)
(cherry picked from commit 0149c7c)
(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 0a89da2)
(cherry picked from commit 9c69490)
(cherry picked from commit b184eaa)
(cherry picked from commit 7fbbf9b)
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 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)
mymage and others added 26 commits May 29, 2026 16:37
Currently translated at 100.0% (354 of 354 strings)

Translation: dms-17.0/dms-17.0-dms
Translate-URL: https://translation.odoo-community.org/projects/dms-17-0/dms-17-0-dms/it/
(cherry picked from commit 5e3b551)
Add the mk_file_kanban_view class to the custom kanban view so that it is
displayed correctly according to the styles set for that class (mk_file_kanban_view).

TT50055

(cherry picked from commit 32fe05a)
…llowed to create

TT50055

[BOT] post-merge updates

[BOT] post-merge updates

(cherry picked from commit a3ebf26)
[BOT] post-merge updates

(cherry picked from commit 8667e21)
(cherry picked from commit 860607c)
Co-authored-by: kobros-tech

TT55505

(cherry picked from commit 1f08ada)
When deleting an attachment, an attempt should be made to delete the linked file, causing an error if it is locked.
Do not show the Delete/Archive/Unarchive option on files if it is locked and you cannot unlock it.

Fixes OCA#381

(cherry picked from commit 60d1158)
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)
… 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)
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)
Structurally-risky 19.0 adaptations:
- Record-level read security is reasserted via a `_search` override: 19.0's
  `ir.rule._compute_domain()` runs only the basic Domain optimizer, which
  bypasses `search=` methods on the non-stored `permission_*` computed fields,
  so the read-side `ir.rule` would no-op. The override AND-s the access-group +
  inheritance domain into the search directly.
- `read_group` -> `_read_group` (keyword `aggregates=`, tuple return).
- `_sql_constraints` -> `models.Constraint`.
- Group categorization: `res.groups.category_id` -> `privilege_id` + a new
  `res.groups.privilege` record; `res.groups.users` -> `user_ids`.
- `Domain` is immutable: negate with `~Domain(...)` instead of `insert(0, "!")`.
@dnplkndll dnplkndll force-pushed the 19.0-mig-dms-test branch from 3b222d1 to f47e782 Compare June 19, 2026 16:43
Forward-port of 938f72d from 18.0 (Related to OCA#470). The upload flow
now POSTs directly to a new `/web/binary/upload_dms_file` controller that
creates the `dms.file` records, instead of round-tripping through
`upload_attachment` + `get_dms_files_from_attachments` (both removed).

19.0 adaptations on top of the forward-port:
- controller translation via `request.env._()` (not `_`).
- dropped the `dms_field` portion of the original commit (separate module, not
  part of this PR).

Co-authored-by: Víctor Martínez <[email protected]>
@dnplkndll dnplkndll closed this Jun 19, 2026
@dnplkndll dnplkndll deleted the 19.0-mig-dms-test branch June 19, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.