Skip to content

[19.0][MIG] dms_field: Migration to 19.0 + UX modernisation#13

Open
dnplkndll wants to merge 212 commits into
19.0from
19.0-mig-dms_field
Open

[19.0][MIG] dms_field: Migration to 19.0 + UX modernisation#13
dnplkndll wants to merge 212 commits into
19.0from
19.0-mig-dms_field

Conversation

@dnplkndll
Copy link
Copy Markdown

Port of dms_field from 18.0 to 19.0.

Non-mechanical adaptations worth flagging

  • setUpClass rewritten to create all fixtures inline (dms.storage, dms.access.group, dms.field.template, template root directory via create_dms_directory) — env.ref("dms_field.field_template_partner") relies on demo data absent in OCA CI.
  • Template's own root directory must be created manually in tests: dms.field.template.create() only auto-creates it under install_mode=True; tests don't run with that context.

UX modernisation

  • dms.field.template form: added name="hero_chips" slot to title block for plugin chip injection.
  • dms_list renderer: file-node preview branch replaced with FilePreviewPane from base DMS (download, open-form, share, dms.preview_actions registry). Directory-node stats panel retained.

Mathias Markl and others added 30 commits May 12, 2026 15:52
versions of muk_dms than 12.0.2.0.0.

Tested from 1.2.4 version.
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
@dnplkndll dnplkndll force-pushed the 19.0-mig-dms_field branch from 1a226ca to 6f4d9ea Compare May 27, 2026 14:33
dnplkndll and others added 13 commits May 27, 2026 10:37
- sort-imports: reorder import declarations by member-syntax tier then
  first-member alphabetically (multiple before single, none first)
- no-implicit-coercion: replace unary + on toFixed() results with Number()
- no-negated-condition: flip !== null ternary to positive condition
- no-inline-comments: remove inline comment on code line
- capitalized-comments: capitalize section comments in _ACCENT_MAP
TT46805

[UPD] Update dms_auto_classification.pot
[UPD] Update dms_auto_classification.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: dms-16.0/dms-16.0-dms_auto_classification
Translate-URL: https://translation.odoo-community.org/projects/dms-16-0/dms-16-0-dms_auto_classification/
Changes done:
- The full path is now shown in the detail line.
- The dms file that will be created will be with the name (not the full file path).
- When scanning the .zip files the folders are skipped.
- Add more use cases in tests
- Improve documentation

TT49047

[UPD] Update dms_auto_classification.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: dms-16.0/dms-16.0-dms_auto_classification
Translate-URL: https://translation.odoo-community.org/projects/dms-16-0/dms-16-0-dms_auto_classification/
…he same label

WARNING devel odoo.addons.base.models.ir_model: Two fields (file_id, data_file) of
wizard.dms.classification.detail() have the same label: File. [Modules: dms_auto_classification
and dms_auto_classification]

TT51051

[UPD] Update dms_auto_classification.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: dms-16.0/dms-16.0-dms_auto_classification
Translate-URL: https://translation.odoo-community.org/projects/dms-16-0/dms-16-0-dms_auto_classification/
…ies (company compatibility)

It is important not to apply sudo() to filter by the directories to which the user
has access and to filter only by those of the appropriate company.

TT60719
- `groups_id` → `group_ids` on both `ir.actions.act_window` records
  (19.0 field rename)
- Tests: replace `env.ref()` demo-data lookups with inline fixtures in
  `setUpClass` — OCA CI runs without demo data
access_wizard_dms_classification_detail_user pointed to
model_dms_classification_template instead of
model_wizard_dms_classification_detail, so group_dms_user never got
CRUD access to wizard.dms.classification.detail — causing AccessError
when running the classify wizard as a regular DMS user.
@dnplkndll dnplkndll force-pushed the 19.0-mig-dms_field branch from 6f4d9ea to 278216f Compare May 27, 2026 14:43
…ation

pylint-odoo W8161 mandates self.env._() over the legacy _() lazy import.
@dnplkndll dnplkndll force-pushed the 19.0-mig-dms_field branch from 278216f to 50748de Compare May 27, 2026 15:13
dnplkndll added 3 commits May 27, 2026 11:18
…ile_id to break 19.0 recursive invalidation loop
Full source of dms_field at 18.0.1.1.3 — replays authorship from the
original [ADD] (Creu Blanca / Carlos Roca) and subsequent contributions
(Tecnativa / Víctor Martínez, SimonRubino / PyTech). CONTRIBUTORS.md
lists the full attribution chain.
@dnplkndll dnplkndll force-pushed the 19.0-mig-dms_field branch 4 times, most recently from 3ebd721 to 066837a Compare May 29, 2026 19:45
dnplkndll added 5 commits May 29, 2026 18:00
- Rewrote setUpClass to create fixtures inline (storage, dms.access.group,
  dms.field.template, template root directory) — OCA CI runs without demo
  data so env.ref("dms_field.field_template_partner") would fail
… dms_list)

- Add hero_chips named slot to dms.field.template form view
- Replace custom file-node preview in dms_list renderer with FilePreviewPane
  from base DMS (download, open-form, share, extra-action registry)
- Directory-node panel retained; file branch now leverages shared preview
  infrastructure
- W8161 (prefer-env-translation): replace bare _() with self.env._() in
  dms_access_group, dms_directory, dms_field_template, dms_storage,
  ir_ui_view; drop unused _ from odoo imports
- W8301 (translation-not-lazy): dms_field_template._prepare_autogenerated_group
  — inline % interpolation → self.env._(..., model=, name=, id=) named kwargs
- W8163 (no-search-all): dms_field_mixin.models_to_track_dms_field_template
  — search([]) → search([], limit=False)
- ESLint sort-imports: dms_list_renderer.esm.js — move @DMS import before
  @odoo/owl block (alphabetical module prefix order)
@dnplkndll dnplkndll force-pushed the 19.0-mig-dms_field branch from 066837a to 38b4bec Compare May 29, 2026 22:00
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.