Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added queue_job_context/README.rst
Empty file.
1 change: 1 addition & 0 deletions queue_job_context/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions queue_job_context/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
# Copyright 2022 Ooops (ooops404.com)

{
"name": "Queue Job Context",
"summary": "Queue Job, prepare context before enqueue keys",
"author": "Giovanni Serra - GSLab.it, Ooops, Odoo Community Association (OCA)",
"maintainers": ["AshishHirapara"],
"license": "LGPL-3",
"website": "https://github.com/OCA/queue",
"category": "Tools",
"version": "14.0.1.0.0",
"depends": ["queue_job"],
"installable": True,
}
1 change: 1 addition & 0 deletions queue_job_context/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import base
12 changes: 12 additions & 0 deletions queue_job_context/models/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from odoo import api, models


class Base(models.AbstractModel):
_inherit = "base"

@api.model
def _job_prepare_context_before_enqueue_keys(self):
"""Keys to keep in context of stored jobs
Empty by default for backward compatibility.
"""
return ("tz", "lang", "allowed_company_ids", "force_company", "active_test")
Empty file.
1 change: 1 addition & 0 deletions queue_job_context/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Ooops - Ashish Hirpara <[email protected]>
1 change: 1 addition & 0 deletions queue_job_context/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set the list of context keys that are propagated to jobs ("tz", "lang", "allowed_company_ids", "force_company", "active_test"). This will become the default in 16.0.
Binary file added queue_job_context/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading