Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] queue_job_context: Migration to 15.0 #725

Open
wants to merge 9 commits into
base: 15.0
Choose a base branch
from
Open
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
85 changes: 85 additions & 0 deletions queue_job_context/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
=================
Queue Job Context
=================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a396fff9b7f6110b98599e27afeaa160162bc9e816449372dd3eebf90cd994f8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github
:target: https://github.com/OCA/queue/tree/14.0/queue_job_context
:alt: OCA/queue
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/queue-14-0/queue-14-0-queue_job_context
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=14.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/queue/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/queue/issues/new?body=module:%20queue_job_context%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Giovanni Serra - GSLab.it
* Ooops

Contributors
~~~~~~~~~~~~

* Ooops - Ashish Hirpara <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-AshishHirapara| image:: https://github.com/AshishHirapara.png?size=40px
:target: https://github.com/AshishHirapara
:alt: AshishHirapara

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-AshishHirapara|

This module is part of the `OCA/queue <https://github.com/OCA/queue/tree/14.0/queue_job_context>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
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": "15.0.1.0.0",
"depends": ["queue_job"],
"installable": True,
}
22 changes: 22 additions & 0 deletions queue_job_context/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * queue_job_context
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-05 09:35+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: queue_job_context
#: model:ir.model,name:queue_job_context.model_base
msgid "Base"
msgstr "Base"
19 changes: 19 additions & 0 deletions queue_job_context/i18n/queue_job_context.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * queue_job_context
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: queue_job_context
#: model:ir.model,name:queue_job_context.model_base
msgid "Base"
msgstr ""
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
Loading