Skip to content

[fork-CI] [19.0][MIG] database_size: Migration to 19.0#6

Draft
dnplkndll wants to merge 10 commits into
19.0from
19.0-mig-database_size
Draft

[fork-CI] [19.0][MIG] database_size: Migration to 19.0#6
dnplkndll wants to merge 10 commits into
19.0from
19.0-mig-database_size

Conversation

@dnplkndll

Copy link
Copy Markdown

Port of database_size from 18.0 to 19.0 (migration guide).

Non-mechanical adaptations worth flagging

  • read_group override → _read_group: 19.0 deprecated the public read_group (would fail checklog) and the web client no longer routes group views through it, so the old override was both noisy and dead. Re-implemented on the non-deprecated _read_group with the 19.0 signature (groupby/aggregates/having/order); it still just defaults the group order for the size-report views.
  • _sql_constraintsmodels.Constraint (kept the uniq_model_measurement_date name).
  • _compute_model_name: justified # pylint: disable=no-search-all on the ir.model load (small registry table; new 19.0 pylint-odoo check). The information_schema references are raw table-size SQL, unrelated to translatable-field jsonb assumptions.

@dnplkndll dnplkndll force-pushed the 19.0-mig-database_size branch from 2cc9f09 to c6d731d Compare May 29, 2026 17:51
StefanRijnhart and others added 8 commits June 29, 2026 15:15
Currently translated at 100.0% (68 of 68 strings)

Translation: server-tools-18.0/server-tools-18.0-database_size
Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-database_size/it/
Currently translated at 100.0% (68 of 68 strings)

Translation: server-tools-18.0/server-tools-18.0-database_size
Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-database_size/it/
Fixes

```
  File "/home/odoo/.local/lib/python3.12/site-packages/sentry_sdk/client.py", line 595, in _prepare_event
    new_event = before_send(event, hint or {})
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/odoo/src/user/oca-server-tools/sentry/hooks.py", line 66, in before_send
    if event.setdefault("tags", {})["include_context"]:
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'include_context'
2025-07-08 14:45:45,907 14296 INFO quatra-18-0-development-21441249 sentry_sdk.errors: before send dropped event
```

Error is only logged when running Sentry in debug mode, otherwise events are dropped silently.
Though TransactionCase rolls back database changes, it does not
call `unlink` on `auditlog.rule` records, meaning that `unsubscribe`
is never called to unpatch model methods. This causes subsequent
tests in other modules to unexpectedly execute patched methods.

This commit adds the `AuditLogRuleCommon` test class in an
attempt to identify and prevent patched methods from contaminating
the test environment.
Currently translated at 13.2% (9 of 68 strings)

Translation: server-tools-18.0/server-tools-18.0-database_size
Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-database_size/fr/
@dnplkndll dnplkndll force-pushed the 19.0-mig-database_size branch from c6d731d to e562fc7 Compare June 29, 2026 20:30
@dnplkndll dnplkndll force-pushed the 19.0-mig-database_size branch 4 times, most recently from 4850441 to dc9109b Compare July 2, 2026 21:30
- Replace the `_where_calc()` override (removed in 19.0) with `_search()`,
  the single entry point of all search paths, so the requested dates reach
  `_table_query` from the web client's read paths too.
- Add a regression test for date selection through search_fetch/read_group.
@dnplkndll dnplkndll force-pushed the 19.0-mig-database_size branch from dc9109b to 605183f Compare July 2, 2026 21:37
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.

6 participants