Skip to content

[19.0][MIG] automation_oca: Migration to 19.0 - #54

Open
BogatovT wants to merge 95 commits into
OCA:19.0from
BogatovT:19.0-mig-automation_oca
Open

[19.0][MIG] automation_oca: Migration to 19.0#54
BogatovT wants to merge 95 commits into
OCA:19.0from
BogatovT:19.0-mig-automation_oca

Conversation

@BogatovT

@BogatovT BogatovT commented Jul 8, 2026

Copy link
Copy Markdown

Migration of automation_oca to 19.0

Migrates automation_oca from 18.0 to 19.0, following the
OCA migration guide.

Verified on a local Odoo 19.0 instance: clean install, module test suite green
(Python + JS/hoot in a headless browser), and the automation designer working
end-to-end (mail step, behaviour-triggered child steps, server-action step, cron
progression and statistics).

Framework changes applied

  • Security: res.groups.category_idprivilege_id (new res.groups.privilege
    model); groups_idgroup_ids on menus / users / views.
  • odoo.osv.expression.ANDodoo.fields.Domain.AND.
  • read_group(...)_read_group(...) (returns tuples; m2o groupby yields a
    recordset; a :day groupby on a datetime field returns a tz-aware datetime,
    which required reworking the step sparkline bucketing).
  • Query.select() now returns an SQL object; query.groupby set via
    SQL.identifier(...).
  • self._cr / self._uidself.env.cr / self.env.uid;
    auto_joinbypass_search_access.
  • _search override now forwards the new keyword-only args
    (active_test, bypass_access).
  • werkzeug.urls.url_joinodoo.tools.urls.urljoin
    (url_parse kept, still used by core link_tracker).
  • OWL frontend: many2one field values record.data.x[0]record.data.x.id;
    useOpenX2ManyRecord withParentIdisMany2Many; the custom kanban compiler
    is now injected via rendererProps.Compiler (the static KanbanRecord.Compiler
    is no longer read); web.KanbanView.Buttons is empty in 19, so the upload button
    is now xpath-injected on . (as core account does); owl global →
    @odoo/owl imports.

Runtime fixes (not visible at install time, caught by the test suite)

  • BaseModel._where_calc was removed → _search(domain, bypass_access=True) in
    _get_automation_records_to_create (the record-enrollment query).
  • mail.compose.message.record_name field was removed → dropped from the composer
    values in _run_mail.
  • Test-mode detection changed: threading.current_thread().testing is no longer
    set in 19 → not odoo.modules.module.current_test (matching core mail_mail.py),
    otherwise auto_commit=True triggered a forbidden cr.commit() inside tests.

Tests

  • Python: 0 failed, 0 errors.
  • JS/OWL (hoot, headless Chrome): suite succeeded (graph widget, step-tree
    hierarchy/sort, record click, add-child button).
  • test_automation_mail now inherits core's MockLinkTracker mixin, since in 19
    the link tracker fetches the page title over HTTP when shortening links (blocked
    in tests).
  • Skipped: TestAutomationDate — it relies on odoo-test-helper, which is not
    yet compatible with 19.0 (it uses the removed MetaModel.module_to_models and the
    old Registry.load(cr, package) / setup_models API). The import is guarded and
    the test is @unittest.skipUnless-skipped with an explicit reason; it can be
    re-enabled once the helper is ported.

etobella and others added 30 commits July 8, 2026 09:59
Currently translated at 100.0% (218 of 218 strings)

Translation: automation-16.0/automation-16.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca/it/
Currently translated at 100.0% (218 of 218 strings)

Translation: automation-16.0/automation-16.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca/it/
Currently translated at 96.7% (211 of 218 strings)

Translation: automation-16.0/automation-16.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca/es/
Currently translated at 61.9% (135 of 218 strings)

Translation: automation-16.0/automation-16.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca/fr/
This commit adds the corresponding imports and preparation
code for using some variables and expressions like `today()`,
`datetime`, `user`, etc in the domain (filter) of the automation
configuration.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: automation-16.0/automation-16.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca/
Currently translated at 100.0% (220 of 220 strings)

Translation: automation-16.0/automation-16.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca/it/
[FIX] automation_oca: pass eval_context in step domain safe_eval
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: automation-16.0/automation-16.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca/
Currently translated at 100.0% (220 of 220 strings)

Translation: automation-16.0/automation-16.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: automation-16.0/automation-16.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca/
etobella and others added 23 commits July 8, 2026 09:59
Co-authored-by: Luís Rodríguez <luis.rodriguez@dixmit.com>
Applying a global style affects the styles of other views.
To prevent this from happening, apply a more specific selector
that only applies to the view of this module.
With the changes introduced in odoo/odoo@de056cc#diff-b37c7fd5520c97a29ddc59495779e7be61a66e15e85603928e27b3affb9dc31f, an error was occurring because the change validation on the model was being performed before tearDownClass was executed. Therefore, it has been modified so that the mock changes are applied in each test and cleaned up after each test. This way, the error will no longer appear and the test will run normally.
Currently translated at 100.0% (254 of 254 strings)

Translation: automation-18.0/automation-18.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-18-0/automation-18-0-automation_oca/sl/
Currently translated at 100.0% (254 of 254 strings)

Translation: automation-18.0/automation-18.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-18-0/automation-18-0-automation_oca/sl/
Currently translated at 100.0% (254 of 254 strings)

Translation: automation-18.0/automation-18.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-18-0/automation-18-0-automation_oca/sl/
Currently translated at 100.0% (254 of 254 strings)

Translation: automation-18.0/automation-18.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-18-0/automation-18-0-automation_oca/sl/
Currently translated at 100.0% (254 of 254 strings)

Translation: automation-18.0/automation-18.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-18-0/automation-18-0-automation_oca/sl/
Currently translated at 100.0% (254 of 254 strings)

Translation: automation-18.0/automation-18.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-18-0/automation-18-0-automation_oca/sl/
Currently translated at 100.0% (254 of 254 strings)

Translation: automation-18.0/automation-18.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-18-0/automation-18-0-automation_oca/sl/
Currently translated at 100.0% (254 of 254 strings)

Translation: automation-18.0/automation-18.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-18-0/automation-18-0-automation_oca/sl/
Currently translated at 100.0% (254 of 254 strings)

Translation: automation-18.0/automation-18.0-automation_oca
Translate-URL: https://translation.odoo-community.org/projects/automation-18-0/automation-18-0-automation_oca/sl/
@BogatovT
BogatovT force-pushed the 19.0-mig-automation_oca branch 2 times, most recently from e77a2ba to 464d980 Compare July 8, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.