Skip to content

Commit

Permalink
[MIG] account_invoice_validation_queued: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Saran440 committed May 13, 2024
1 parent 5d8670b commit fe70d72
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 48 deletions.
25 changes: 12 additions & 13 deletions account_invoice_validation_queued/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Enqueue account invoice validation
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoicing/tree/15.0/account_invoice_validation_queued
:target: https://github.com/OCA/account-invoicing/tree/16.0/account_invoice_validation_queued
:alt: OCA/account-invoicing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_invoice_validation_queued
:target: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_invoice_validation_queued
: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/account-invoicing&target_branch=15.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -46,15 +46,12 @@ Installation
This module depends on *queue_job* module that is hosted on
https://github.com/OCA/queue.

If you are migrating from version 13.0.1.0.0 to 13.0.2.0.0, you need
`openupgradelib` library.

Configuration
=============

#. Jobs are enqueued in the channel ``root.account_invoice_validation_queued``,
so you must adjust your
`Odoo configuration <https://github.com/OCA/queue/tree/13.0/queue_job#configuration>`_
`Odoo configuration <https://github.com/OCA/queue/tree/16.0/queue_job#configuration>`_
according this.
#. If you want to see queued jobs, you need "Job Queue / Job Queue Manager"
permission in your user.
Expand All @@ -64,11 +61,11 @@ Configuration
Usage
=====

#. Go to *Invoicing > Sales > Documents > Customer Invoices* or
*Invoicing > Purchases > Documents > Vendor Bills*.
#. Mark at least one check on the left part of one draft invoice line in the
#. Go to *Invoicing > Customers > Invoices* or
*Invoicing > Vendors > Bills*.
#. Mark at least one check on the left part of one draft invoice in the
list view.
#. Click on *Action > Confirm Draft Invoice*.
#. Click on *Action > Post entries*.
#. On the dialog popup that appears, click on "Enqueue Validation".
#. If any of the invoices is already enqueued, there will be a message saying
so and avoiding to perform the process.
Expand All @@ -90,7 +87,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/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/account-invoicing/issues/new?body=module:%20account_invoice_validation_queued%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_invoice_validation_queued%0Aversion:%2016.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.

Expand All @@ -110,6 +107,8 @@ Contributors
* Pedro M. Baeza
* Manuel Calero

* Saran Lim. <saranl@ecosoft.co.th>

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

Expand All @@ -131,6 +130,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-pedrobaeza|

This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/15.0/account_invoice_validation_queued>`_ project on GitHub.
This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/16.0/account_invoice_validation_queued>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion account_invoice_validation_queued/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Enqueue account invoice validation",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Accounting",
"license": "AGPL-3",
"author": "Tecnativa, Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion account_invoice_validation_queued/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#. Jobs are enqueued in the channel ``root.account_invoice_validation_queued``,
so you must adjust your
`Odoo configuration <https://github.com/OCA/queue/tree/13.0/queue_job#configuration>`_
`Odoo configuration <https://github.com/OCA/queue/tree/16.0/queue_job#configuration>`_
according this.
#. If you want to see queued jobs, you need "Job Queue / Job Queue Manager"
permission in your user.
Expand Down
2 changes: 2 additions & 0 deletions account_invoice_validation_queued/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

* Pedro M. Baeza
* Manuel Calero

* Saran Lim. <saranl@ecosoft.co.th>
3 changes: 0 additions & 3 deletions account_invoice_validation_queued/readme/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
This module depends on *queue_job* module that is hosted on
https://github.com/OCA/queue.

If you are migrating from version 13.0.1.0.0 to 13.0.2.0.0, you need
`openupgradelib` library.
8 changes: 4 additions & 4 deletions account_invoice_validation_queued/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#. Go to *Invoicing > Sales > Documents > Customer Invoices* or
*Invoicing > Purchases > Documents > Vendor Bills*.
#. Mark at least one check on the left part of one draft invoice line in the
#. Go to *Invoicing > Customers > Invoices* or
*Invoicing > Vendors > Bills*.
#. Mark at least one check on the left part of one draft invoice in the
list view.
#. Click on *Action > Confirm Draft Invoice*.
#. Click on *Action > Post entries*.
#. On the dialog popup that appears, click on "Enqueue Validation".
#. If any of the invoices is already enqueued, there will be a message saying
so and avoiding to perform the process.
Expand Down
20 changes: 9 additions & 11 deletions account_invoice_validation_queued/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -369,7 +368,7 @@ <h1 class="title">Enqueue account invoice validation</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:52e5a113d773cd9be743169e32d06e4a7e45ac6ff87b6262b2fb96ee70aa18d9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-invoicing/tree/15.0/account_invoice_validation_queued"><img alt="OCA/account-invoicing" src="https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_invoice_validation_queued"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-invoicing/tree/16.0/account_invoice_validation_queued"><img alt="OCA/account-invoicing" src="https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_invoice_validation_queued"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to enqueue in several jobs the account validation process
to be executed in paralell on background, which is normally done serially and
on foreground.</p>
Expand All @@ -395,15 +394,13 @@ <h1 class="title">Enqueue account invoice validation</h1>
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
<p>This module depends on <em>queue_job</em> module that is hosted on
<a class="reference external" href="https://github.com/OCA/queue">https://github.com/OCA/queue</a>.</p>
<p>If you are migrating from version 13.0.1.0.0 to 13.0.2.0.0, you need
<cite>openupgradelib</cite> library.</p>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
<ol class="arabic simple">
<li>Jobs are enqueued in the channel <tt class="docutils literal">root.account_invoice_validation_queued</tt>,
so you must adjust your
<a class="reference external" href="https://github.com/OCA/queue/tree/13.0/queue_job#configuration">Odoo configuration</a>
<a class="reference external" href="https://github.com/OCA/queue/tree/16.0/queue_job#configuration">Odoo configuration</a>
according this.</li>
<li>If you want to see queued jobs, you need “Job Queue / Job Queue Manager”
permission in your user.</li>
Expand All @@ -414,11 +411,11 @@ <h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
<ol class="arabic simple">
<li>Go to <em>Invoicing &gt; Sales &gt; Documents &gt; Customer Invoices</em> or
<em>Invoicing &gt; Purchases &gt; Documents &gt; Vendor Bills</em>.</li>
<li>Mark at least one check on the left part of one draft invoice line in the
<li>Go to <em>Invoicing &gt; Customers &gt; Invoices</em> or
<em>Invoicing &gt; Vendors &gt; Bills</em>.</li>
<li>Mark at least one check on the left part of one draft invoice in the
list view.</li>
<li>Click on <em>Action &gt; Confirm Draft Invoice</em>.</li>
<li>Click on <em>Action &gt; Post entries</em>.</li>
<li>On the dialog popup that appears, click on “Enqueue Validation”.</li>
<li>If any of the invoices is already enqueued, there will be a message saying
so and avoiding to perform the process.</li>
Expand All @@ -441,7 +438,7 @@ <h1><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-invoicing/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_invoice_validation_queued%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_invoice_validation_queued%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -460,6 +457,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Contributors</a></h2>
<li>Manuel Calero</li>
</ul>
</li>
<li>Saran Lim. &lt;<a class="reference external" href="mailto:saranl&#64;ecosoft.co.th">saranl&#64;ecosoft.co.th</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -471,7 +469,7 @@ <h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/pedrobaeza"><img alt="pedrobaeza" src="https://github.com/pedrobaeza.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-invoicing/tree/15.0/account_invoice_validation_queued">OCA/account-invoicing</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-invoicing/tree/16.0/account_invoice_validation_queued">OCA/account-invoicing</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import exceptions
from odoo import Command, exceptions
from odoo.tests import TransactionCase


Expand All @@ -13,31 +13,26 @@ def setUpClass(cls):
cls.queue_obj = cls.env["queue.job"]

cls.partner = cls.env["res.partner"].create({"name": "Test partner"})
cls.account_type = cls.env["account.account.type"].create(
{"name": "Test account type", "internal_group": "equity"}
)
cls.account = cls.env["account.account"].create(
{
"name": "Test account",
"code": "TEST_AIVQ",
"user_type_id": cls.account_type.id,
"code": "TEST.AIVQ",
"account_type": "equity",
}
)
cls.invoice = cls.env["account.move"].create(
{
"partner_id": cls.partner.id,
"move_type": "out_invoice",
"invoice_line_ids": [
(
0,
0,
Command.create(
{
"name": "Test product",
"account_id": cls.account.id,
"price_unit": 20.0,
"quantity": 1.0,
},
),
}
)
],
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@
<record id="view_move_form" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field
name="groups_id"
eval="[(4, ref('queue_job.group_queue_job_manager'))]"
/>
<field name="arch" type="xml">
<notebook position="inside">
<page
name="page_validation_jobs"
string="Validation Jobs"
attrs="{'invisible': [('validation_job_ids', '=', [])]}"
groups="queue_job.group_queue_job_manager"
>
<field
name="validation_job_ids"
Expand Down

0 comments on commit fe70d72

Please sign in to comment.