[Phase 2 preview] dms: OWL UX refinements (stacked on #475)#2
Closed
dnplkndll wants to merge 2 commits into
Closed
[Phase 2 preview] dms: OWL UX refinements (stacked on #475)#2dnplkndll wants to merge 2 commits into
dnplkndll wants to merge 2 commits into
Conversation
- `dms_security_mixin`: override `_search()` to restore the access filter
after 19.0's `Domain.optimize(basic)` bypass; update `_read_group` to
the new aggregate-tuple return signature.
- `directory._search_starred`: handle the 19.0 Domain optimizer
normalisation that turns `('starred', '=', True)` into
`('starred', 'in', {True})`. Without this, starred-search returns the
inverse set (test_starred fails).
- Switch `odoo.osv.expression` (`AND`/`OR`) to `odoo.fields.Domain`
(`Domain.AND`/`Domain.OR`).
- Rename `auto_join` → `bypass_search_access` across one2many/many2one
fields (10 sites).
- `res.users` references: `groups_id` → `group_ids` (m2m rename).
- `_sql_constraints` → `models.Constraint` declarations.
- Controllers: `@route(type='json')` → `@route(type='jsonrpc')`.
- Security: replace `category_id` with `privilege_id`; add the privilege
records the 2-tier user/manager group structure expects.
- Demo data: `groups_id` → `group_ids` on `res.users` fixtures.
- Tests: add `require_demo_xmlid` helper so demo-dependent tests skip
gracefully on CI (which runs without demo data).
- Translation calls in `directory.py` modernised to `self.env._()` to
satisfy 19.0's pylint_odoo W8161/W8301 (co-located with the
`_search_starred` fix; portal.py/test cleanup lives in `[IMP]`).
- Search view: drop deprecated `expand="0"` + `string="Group By"` from
`<group>`; trivial XPath updates to OWL 2 templates.
- Portal tour: drop deprecated `test: true` flag; adapt step to the
19.0 verify-only pattern.
Signed-off-by: Daniel Kendall <dkendall@ledoweb.com>
Follow-up to OCA#475 phase 1 (the minimal-viable 19.0 [MIG]). Opens on the ledoent fork against the phase 1 branch so reviewers can preview the delta on top of OCA#475 before it lands. - **Breadcrumb modernisation**: replace `path_owl.xml`'s inline-style `<a oe_form_uri>` + `<span style="display: inline">` pattern with Odoo 19's `<ol class="o_breadcrumb breadcrumb"><li class="breadcrumb-item">` Bootstrap idiom. Final segment uses `class="breadcrumb-item active"` with `aria-current="page"` per Bootstrap a11y guidance. - **Restore `filter_domain` on `dms_category.xml`** search view — `filter_domain="['|', ('name', 'ilike', self), ('parent_id', 'child_of', raw_value)]"` was removed in OCA#475 and re-introduces the 18.0 UX of filtering by parent category subtree when typing a parent's name. The bare 19.0 default `ilike` on name lost that behaviour. (Tag search left as default — 18.0's filter was equivalent to 19.0's default for that field.) Originally this PR also rewired the kanban `buttonTemplate` from `dms.KanbanButtons` to the orphan `dms.FileKanbanView.Buttons` template, but that template uses invalid OWL inheritance syntax (`<div role="toolbar" position="inside">` instead of `<xpath ...>`) AND references controller hooks (`uploadFileInputRef`, `onFileInputChange`) that don't exist on the controller. Reverted; phase 1's classic `dms.KanbanButtons` template stays in place (it's now self-contained without `t-inherit` since 19.0's `web.KanbanView.Buttons` is empty). Deferred to a later round: JS dead-code audit (inconclusive — core 19.0 `LinkPreview` has no native `imageUrl` getter, so our patches may still be load-bearing), coverage closure, and a proper kanban UX modernisation once `dms.FileKanbanView.Buttons` is fixed or replaced. Signed-off-by: Daniel Kendall <dkendall@ledoweb.com>
844f8bd to
c603804
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.
Preview of the phase 2 OWL/UX refinements that follow OCA/dms#475 (the minimal-viable 19.0 [MIG]).
Opened on ledoent fork against the phase 1 branch so the diff visible here is ONLY the phase 2 delta — easy to review without re-reading the 30 files of OCA#475. The merge target is intentionally
ledoent/dms:19.0-mig-dms(not OCA upstream) until OCA#475 lands.What's in this PR
dms.KanbanButtons(mobile-Scan + desktop-Upload), rewirebuttonTemplateto the moderndms.FileKanbanView.Buttons(single Upload +t-refhooks). Mobile-Scan UX intentionally dropped — dropzone covers it.path_owl.xmlswitches from inline-style<a oe_form_uri>to Odoo 19'so_breadcrumb+breadcrumb-itemBootstrap idiom witharia-current="page".filter_domainondms_category.xml: re-introduces the 18.0 UX of('parent_id', 'child_of', raw_value)matching when typing a parent category's name. (Tag search left as default — 18.0's filter was equivalent to 19.0's default.)Deferred to a later round
attachment_image.esm.js/attachment_viewer_viewable.esm.js— verification inconclusive; keeping both until clearer signal.coverage.pyintegration + tests for_search()override +_search_starredoperator normalisation).storage.xmletc.).Promotion path to OCA
Once OCA#475 merges and the
dms19.0.1.0.0 wheel publishes to PyPI:OCA/dms:19.0(Phase 1 commits absorbed).gh pr create --repo OCA/dms --base 19.0 --head ledoent:19.0-mig-dms-phase-2 --draft).Runboat preview
Fork PRs don't get OCA runboat automatically. To preview the UX changes in a runboat-style build, either spin up a local 19.0 doodba with this branch checked out, or wait until step 2 above puts this on OCA's runboat.