diff --git a/attachment_queue/README.rst b/attachment_queue/README.rst index 1ba66a5d60c..287cbce2168 100644 --- a/attachment_queue/README.rst +++ b/attachment_queue/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - ================ Attachment Queue ================ @@ -17,7 +13,7 @@ Attachment Queue .. |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/license-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github diff --git a/attachment_queue/__manifest__.py b/attachment_queue/__manifest__.py index dc0e6feb260..be6af97c8c6 100644 --- a/attachment_queue/__manifest__.py +++ b/attachment_queue/__manifest__.py @@ -16,6 +16,7 @@ "security/ir.model.access.csv", "data/mail_template.xml", "data/queue_job_channel.xml", + "data/queue_job_function.xml", "wizards/attachement_queue_reschedule.xml", ], "demo": ["demo/attachment_queue.xml"], diff --git a/attachment_queue/data/queue_job_function.xml b/attachment_queue/data/queue_job_function.xml new file mode 100644 index 00000000000..d56ad727995 --- /dev/null +++ b/attachment_queue/data/queue_job_function.xml @@ -0,0 +1,9 @@ + + + + + run_as_job + + + + diff --git a/attachment_queue/models/attachment_queue.py b/attachment_queue/models/attachment_queue.py index 0b56936cfc7..e8fbc3bc0e1 100644 --- a/attachment_queue/models/attachment_queue.py +++ b/attachment_queue/models/attachment_queue.py @@ -54,7 +54,7 @@ class AttachmentQueue(models.Model): def _job_attrs(self): # Override this method to have file type specific job attributes self.ensure_one() - return {"channel": "root.attachment_queue"} + return {} def _schedule_jobs(self): for el in self: diff --git a/attachment_queue/static/description/index.html b/attachment_queue/static/description/index.html index d4154a6aeb1..8943bf704bd 100644 --- a/attachment_queue/static/description/index.html +++ b/attachment_queue/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +Attachment Queue -
+
+

Attachment Queue

- - -Odoo Community Association - -
-

Attachment Queue

-

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

This module adds async processing capabilities to attachments by implementing a new model attachment.queue that wraps attachments and stores additional information so that it can be processed in an @@ -395,7 +390,7 @@

Attachment Queue

-

Usage

+

Usage

Go the menu Settings > Technical > Database Structure > Attachments Queue

You can create / see standard attachments with additional fields

@@ -409,7 +404,7 @@

Usage

form view

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub 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 @@ -417,15 +412,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Akretion
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -450,6 +445,5 @@

Maintainers

-
diff --git a/attachment_queue/tests/test_attachment_queue.py b/attachment_queue/tests/test_attachment_queue.py index acad15a62b4..57a014cb2f2 100644 --- a/attachment_queue/tests/test_attachment_queue.py +++ b/attachment_queue/tests/test_attachment_queue.py @@ -40,6 +40,12 @@ def setUp(self): self.loader.update_registry((AttachmentQueue,)) self.aq_model = self.env["attachment.queue"] + # allow_commit option is not really compatible with tests because we create + # the attachment queue in the test and if the job opens a new cursor, the + # created attachment does not exist yet. + self.env.ref("attachment_queue.job_function_run_attachment_queue").write( + {"allow_commit": False} + ) def tearDown(self): super().tearDown()