Skip to content

Amend context per call? #819

Description

@dannyadair

I'd like to include a particular context key for one with_delay() call so that it is preserved, but not extend the base allow list for all jobs. Is that possible?

Activity

  1. amh-mw commented on Aug 29, 2025

    @amh-mw
    Member

    Short answer, no.
    Edit: Have you looked at

    The default allow-list is ("tz", "lang", "allowed_company_ids", "force_company", "active_test"). It can be customized in Base._job_prepare_context_before_enqueue_keys. Bypass jobs on running Odoo

    Long answer, you raise a similar point as #768 (comment); please feel free to join us in the discussion there.

  2. dannyadair commented on Aug 29, 2025

    @dannyadair
    ContributorAuthor

    Thank you, I'll close this and join there!

  3. dannyadair commented on Aug 29, 2025

    @dannyadair
    ContributorAuthor

    It can be customized in Base._job_prepare_context_before_enqueue_keys.

    that's not per call though

    but not extend the base allow list for all jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions