Skip to content

[REVIEW] database_size: rebuilt 18.0 history (replay + bot-squash)#15

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

[REVIEW] database_size: rebuilt 18.0 history (replay + bot-squash)#15
dnplkndll wants to merge 10 commits into
19.0from
19.0-mig-database_size-rebuild

Conversation

@dnplkndll

Copy link
Copy Markdown

Structure-verification copy of the database_size MIG, rebuilt to fix StefanRijnhart's concern on OCA#3632 ("why don't the commits reflect the 18.0 history?").

What was wrong on OCA#3632

  • The module history was collapsed into one synthetic [ADD] database_size — original authorship/history lost.
  • That hand-built [ADD] also silently dropped i18n/fr.po (Sylvain LE GAL's French translation).

This branch (odoo-mig skill)

Ladder:

[MIG] database_size: Migration to 19.0        (Don Kendall)
[IMP] database_size: pre-commit auto fixes    (Don Kendall)
Translated/Added French                       (Sylvain LE GAL)   ← restored
[FIX] auditlog / [FIX] sentry                 (Adam Heinz / Stefan Rijnhart)
Translated/Added Italian                      (Sergio Zanchetta / mymage)
[ADD] database_size                           (Stefan Rijnhart)

(The two [FIX] commits touched database_size's generated README/index in 18.0, so they're part of its real path history.)

Copy branch for approval — once confirmed, the same ladder force-pushes to 19.0-mig-database_size (OCA#3632).

StefanRijnhart and others added 10 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/
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
- read_group override → _read_group (19.0 deprecated public read_group + web no longer routes through it). New signature (groupby/aggregates/having/order); still defaults the group order for the report views.
- search view: dropped `expand`/`string` from the Group By <group> (19.0 RelaxNG rejects them on search-view groups).
- _sql_constraints → models.Constraint (kept uniq_model_measurement_date name).
- report: f-strings inside self.env._() → %(name)s placeholders (19.0 pylint translation-fstring-interpolation).
- _compute_model_name: justified `# pylint: disable=no-search-all` (small ir.model registry load).

Signed-off-by: Don Kendall <dkendall@ledoweb.com>
@dnplkndll dnplkndll closed this Jun 29, 2026
@dnplkndll dnplkndll deleted the 19.0-mig-database_size-rebuild branch June 29, 2026 20:34
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