Skip to content
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
92 changes: 92 additions & 0 deletions sale_automatic_workflow_job/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
===========================
Sale Automatic Workflow Job
===========================

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

.. |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-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%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/15.0/sale_automatic_workflow_job
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_automatic_workflow_job
: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/sale-workflow&target_branch=15.0
:alt: Try me on Runboat

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

Use Queue Jobs to process the Sales Automatic Workflow actions.

The default behavior of the automatic workflow module is to use a
scheduled action that searches all the record that need a workflow
action and sequentially process all of them.

It can hit some limits when the number of records is too high.

This module keeps the scheduled action to search the records, but
instead of directly executing the actions (confirm a sales order,
create invoices for a sales order, validate invoices, ...), it
creates one job per operation to do.

It uses an identity key on the jobs so it will not create the same
job for the same record and same operation twice.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/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/sale-workflow/issues/new?body=module:%20sale_automatic_workflow_job%0Aversion:%2015.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
~~~~~~~

* Camptocamp

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

* Guewen Baconnier <guewen.baconnier@camptocamp.com>
* Saran Lim. <saranl@ecosoft.co.th>
* Kitti U. <kittiu@ecosoft.co.th>

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.

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/15.0/sale_automatic_workflow_job>`_ 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 sale_automatic_workflow_job/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions sale_automatic_workflow_job/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2020 Camptocamp (https://www.camptocamp.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sale Automatic Workflow Job",
"summary": "Execute sale automatic workflows in queue jobs",
"version": "15.0.1.0.0",
"category": "Sales Management",
"license": "AGPL-3",
"author": "Camptocamp, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"depends": ["sale_automatic_workflow", "queue_job"],
"data": [
"data/queue_job_data.xml",
],
}
74 changes: 74 additions & 0 deletions sale_automatic_workflow_job/data/queue_job_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Queue Job Channel -->
<record id="channel_sale_automatic_workflow" model="queue.job.channel">
<field name="name">channel.sale.automatic.workflow</field>
<field name="parent_id" ref="queue_job.channel_root" />
</record>

<!-- Queue Job Function -->
<record id="job_function_do_validate_sale_order" model="queue.job.function">
<field
name="model_id"
ref="sale_automatic_workflow_job.model_automatic_workflow_job"
/>
<field name="method">_do_validate_sale_order</field>
<field name="channel_id" ref="channel_sale_automatic_workflow" />
<field
name="related_action"
eval='{"func_name": "_related_action_sale_automatic_workflow"}'
/>
</record>

<record id="job_function_do_create_invoice" model="queue.job.function">
<field
name="model_id"
ref="sale_automatic_workflow_job.model_automatic_workflow_job"
/>
<field name="method">_do_create_invoice</field>
<field name="channel_id" ref="channel_sale_automatic_workflow" />
<field
name="related_action"
eval='{"func_name": "_related_action_sale_automatic_workflow"}'
/>
</record>

<record id="job_function_do_validate_invoice" model="queue.job.function">
<field
name="model_id"
ref="sale_automatic_workflow_job.model_automatic_workflow_job"
/>
<field name="method">_do_validate_invoice</field>
<field name="channel_id" ref="channel_sale_automatic_workflow" />
<field
name="related_action"
eval='{"func_name": "_related_action_sale_automatic_workflow"}'
/>
</record>

<record id="job_function_do_validate_picking" model="queue.job.function">
<field
name="model_id"
ref="sale_automatic_workflow_job.model_automatic_workflow_job"
/>
<field name="method">_do_validate_picking</field>
<field name="channel_id" ref="channel_sale_automatic_workflow" />
<field
name="related_action"
eval='{"func_name": "_related_action_sale_automatic_workflow"}'
/>
</record>

<record id="job_function_do_sale_done" model="queue.job.function">
<field
name="model_id"
ref="sale_automatic_workflow_job.model_automatic_workflow_job"
/>
<field name="method">_do_sale_done</field>
<field name="channel_id" ref="channel_sale_automatic_workflow" />
<field
name="related_action"
eval='{"func_name": "_related_action_sale_automatic_workflow"}'
/>
</record>
</odoo>
73 changes: 73 additions & 0 deletions sale_automatic_workflow_job/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_automatic_workflow_job
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-09-20 04:33+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\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: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Create invoices for sales order {}"
msgstr "Cree facturas para pedidos de venta {}"

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Mark sales order {} as done"
msgstr "Marcar el pedido de ventas {} como hecho"

#. module: sale_automatic_workflow_job
#: model:ir.model,name:sale_automatic_workflow_job.model_queue_job
msgid "Queue Job"
msgstr "Cola de trabajo"

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/queue_job.py:0
#, python-format
msgid "Sale Automatic Workflow Job"
msgstr "Flujo Automático de Trabajo"

#. module: sale_automatic_workflow_job
#: model:ir.model,name:sale_automatic_workflow_job.model_automatic_workflow_job
msgid ""
"Scheduler that will play automatically the validation of invoices, "
"pickings..."
msgstr ""
"Programador que reproducirá automáticamente la validación de facturas, "
"recogidas..."

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Validate invoice {}"
msgstr "Validar factura {}"

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Validate sales order {}"
msgstr "Validar pedido de venta {}"

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Validate transfer {}"
msgstr "Validar transferencia {}"
73 changes: 73 additions & 0 deletions sale_automatic_workflow_job/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_automatic_workflow_job
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-15 18:33+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Create invoices for sales order {}"
msgstr "Crea fattura per ordine di vendita {}"

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Mark sales order {} as done"
msgstr "Segna l'ordine di vendita {} come fatto"

#. module: sale_automatic_workflow_job
#: model:ir.model,name:sale_automatic_workflow_job.model_queue_job
msgid "Queue Job"
msgstr "Lavoro in coda"

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/queue_job.py:0
#, python-format
msgid "Sale Automatic Workflow Job"
msgstr "Lavoro flusso automatico vendita"

#. module: sale_automatic_workflow_job
#: model:ir.model,name:sale_automatic_workflow_job.model_automatic_workflow_job
msgid ""
"Scheduler that will play automatically the validation of invoices, "
"pickings..."
msgstr ""
"Schedulatore che riprodurrà in automatico la validazione delle fatture, "
"prelievi..."

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Validate invoice {}"
msgstr "Validare la fattura {}"

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Validate sales order {}"
msgstr "Valida ordine di vendita {}"

#. module: sale_automatic_workflow_job
#. odoo-python
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Validate transfer {}"
msgstr "Valida trasferimento {}"
62 changes: 62 additions & 0 deletions sale_automatic_workflow_job/i18n/sale_automatic_workflow_job.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_automatic_workflow_job
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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: sale_automatic_workflow_job
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Create invoices for sales order {}"
msgstr ""

#. module: sale_automatic_workflow_job
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Mark sales order {} as done"
msgstr ""

#. module: sale_automatic_workflow_job
#: model:ir.model,name:sale_automatic_workflow_job.model_queue_job
msgid "Queue Job"
msgstr ""

#. module: sale_automatic_workflow_job
#: code:addons/sale_automatic_workflow_job/models/queue_job.py:0
#, python-format
msgid "Sale Automatic Workflow Job"
msgstr ""

#. module: sale_automatic_workflow_job
#: model:ir.model,name:sale_automatic_workflow_job.model_automatic_workflow_job
msgid ""
"Scheduler that will play automatically the validation of invoices, "
"pickings..."
msgstr ""

#. module: sale_automatic_workflow_job
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Validate invoice {}"
msgstr ""

#. module: sale_automatic_workflow_job
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Validate sales order {}"
msgstr ""

#. module: sale_automatic_workflow_job
#: code:addons/sale_automatic_workflow_job/models/automatic_workflow_job.py:0
#, python-format
msgid "Validate transfer {}"
msgstr ""
Loading
Loading