Skip to content

Commit 2e9aebb

Browse files
AdriaGForgeFlowOCA-git-bot
authored andcommitted
[11.0][ADD] Module purchase_request_tier_validation
1 parent 213a9aa commit 2e9aebb

19 files changed

+937
-0
lines changed

Diff for: purchase_request_tier_validation/README.rst

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
================================
2+
Purchase Request Tier Validation
3+
================================
4+
5+
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!! This file is generated by oca-gen-addon-readme !!
7+
!! changes will be overwritten. !!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
10+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
11+
:target: https://odoo-community.org/page/development-status
12+
:alt: Beta
13+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
14+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
15+
:alt: License: AGPL-3
16+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
17+
:target: https://github.com/OCA/purchase-workflow/tree/11.0/purchase_request_tier_validation
18+
:alt: OCA/purchase-workflow
19+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20+
:target: https://translation.odoo-community.org/projects/purchase-workflow-11-0/purchase-workflow-11-0-purchase_request_tier_validation
21+
:alt: Translate me on Weblate
22+
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23+
:target: https://runbot.odoo-community.org/runbot/142/11.0
24+
:alt: Try me on Runbot
25+
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
27+
28+
This module extends the functionality of Purchase Requests to support a tier validation process.
29+
30+
**Table of contents**
31+
32+
.. contents::
33+
:local:
34+
35+
Installation
36+
============
37+
38+
This module depends on ``base_tier_validation``. You can find it at
39+
`OCA/server-ux <https://github.com/OCA/server-ux>`_
40+
41+
Configuration
42+
=============
43+
44+
A default tier is created allowing Purchase Request Manager to approve Purchase
45+
Requests.
46+
47+
In addition, you may want to add more tiers, so:
48+
49+
#. Go to *Settings > Technical > Tier Validations > Tier Definition*.
50+
#. Create as many tiers as you want for Purchase Order model.
51+
52+
Usage
53+
=====
54+
55+
To use this module, you need to:
56+
57+
#. Create a Purchase Request triggering at least one "Tier Definition".
58+
#. Click on *Request Validation* button.
59+
#. Under the tab *Reviews* have a look to pending reviews and their statuses.
60+
#. Once all reviews are validated button to *Confirm* will be shown.
61+
62+
Additional features:
63+
64+
* You can filter the Purchase Request requesting your review through the filter *Needs my
65+
Review*.
66+
* User with rights to confirm the Purchase Request (validate all tiers that would
67+
be generated) can directly do the operation, this is, there is no need for
68+
her/him to request a validation.
69+
70+
Bug Tracker
71+
===========
72+
73+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/issues>`_.
74+
In case of trouble, please check there if your issue has already been reported.
75+
If you spotted it first, help us smashing it by providing a detailed and welcomed
76+
`feedback <https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_request_tier_validation%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
77+
78+
Do not contact contributors directly about support or help with technical issues.
79+
80+
Credits
81+
=======
82+
83+
Authors
84+
~~~~~~~
85+
86+
* Eficent
87+
88+
Contributors
89+
~~~~~~~~~~~~
90+
91+
* Adria Gil <[email protected]>
92+
93+
94+
Other credits
95+
~~~~~~~~~~~~~
96+
97+
Images
98+
------
99+
100+
* Enric Tobella (logo)
101+
102+
Maintainers
103+
~~~~~~~~~~~
104+
105+
This module is maintained by the OCA.
106+
107+
.. image:: https://odoo-community.org/logo.png
108+
:alt: Odoo Community Association
109+
:target: https://odoo-community.org
110+
111+
OCA, or the Odoo Community Association, is a nonprofit organization whose
112+
mission is to support the collaborative development of Odoo features and
113+
promote its widespread use.
114+
115+
This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/11.0/purchase_request_tier_validation>`_ project on GitHub.
116+
117+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Diff for: purchase_request_tier_validation/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models

Diff for: purchase_request_tier_validation/__manifest__.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Purchase Request Tier Validation",
5+
"summary": "Extends the functionality of Purchase Requests to "
6+
"support a tier validation process.",
7+
"version": "11.0.1.0.0",
8+
"category": "Purchase Management",
9+
"website": "https://github.com/OCA/purchase-workflow",
10+
"author": "Eficent, Odoo Community Association (OCA)",
11+
"license": "AGPL-3",
12+
"application": False,
13+
"installable": True,
14+
"depends": [
15+
"purchase_request",
16+
"base_tier_validation",
17+
],
18+
"data": [
19+
"data/purchase_request_tier_definition.xml",
20+
"views/purchase_request_view.xml",
21+
],
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!-- Copyright 2019 Eficent Business and IT Consulting Services S.L.
3+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4+
<odoo noupdate="1">
5+
<record id="purchase_request_default_tier_definition" model="tier.definition">
6+
<field name="model_id" ref="model_purchase_request"/>
7+
<field name="definition_type">domain</field>
8+
<field name="definition_domain"/>
9+
<field name="review_type">group</field>
10+
<field name="reviewer_group_id" ref='purchase_request.group_purchase_request_manager'/>
11+
</record>
12+
</odoo>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * purchase_request_tier_validation
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 11.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: <>\n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: purchase_request_tier_validation
17+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_form_inherit_tier
18+
msgid "<i class=\"fa fa-info-circle\"/>This Purchase Request needs to be\n"
19+
" validated."
20+
msgstr ""
21+
22+
#. module: purchase_request_tier_validation
23+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_form_inherit_tier
24+
msgid "<i class=\"fa fa-thumbs-down\"/> Operation has been <b>rejected</b>."
25+
msgstr ""
26+
27+
#. module: purchase_request_tier_validation
28+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_form_inherit_tier
29+
msgid "<i class=\"fa fa-thumbs-up\"/> Operation has been <b>validated</b>!"
30+
msgstr ""
31+
32+
#. module: purchase_request_tier_validation
33+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_form_inherit_tier
34+
msgid "Confirm"
35+
msgstr ""
36+
37+
#. module: purchase_request_tier_validation
38+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.tier_review_form_wiz
39+
msgid "Dismiss"
40+
msgstr ""
41+
42+
#. module: purchase_request_tier_validation
43+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_filter
44+
msgid "My Purchases to review"
45+
msgstr ""
46+
47+
#. module: purchase_request_tier_validation
48+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_filter
49+
msgid "Need actions"
50+
msgstr ""
51+
52+
#. module: purchase_request_tier_validation
53+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_filter
54+
msgid "Needs my Review"
55+
msgstr ""
56+
57+
#. module: purchase_request_tier_validation
58+
#: model:tier.definition,name:purchase_request_tier_validation.purchase_request_default_tier_definition
59+
msgid "New Tier Validation"
60+
msgstr ""
61+
62+
#. module: purchase_request_tier_validation
63+
#: model:ir.model,name:purchase_request_tier_validation.model_purchase_request
64+
msgid "Purchase Request"
65+
msgstr ""
66+
67+
#. module: purchase_request_tier_validation
68+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_filter
69+
msgid "Purchase Requests validated and ready to be confirmed"
70+
msgstr ""
71+
72+
#. module: purchase_request_tier_validation
73+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_form_inherit_tier
74+
msgid "Reject"
75+
msgstr ""
76+
77+
#. module: purchase_request_tier_validation
78+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_form_inherit_tier
79+
msgid "Request Validation"
80+
msgstr ""
81+
82+
#. module: purchase_request_tier_validation
83+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_form_inherit_tier
84+
msgid "Restart Validation"
85+
msgstr ""
86+
87+
#. module: purchase_request_tier_validation
88+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.tier_review_form_wiz
89+
msgid "Tier Review"
90+
msgstr ""
91+
92+
#. module: purchase_request_tier_validation
93+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_form_inherit_tier
94+
msgid "Validate"
95+
msgstr ""
96+
97+
#. module: purchase_request_tier_validation
98+
#: model:ir.ui.view,arch_db:purchase_request_tier_validation.view_purchase_request_filter
99+
msgid "Validated"
100+
msgstr ""
101+
102+
#. module: purchase_request_tier_validation
103+
#: model:ir.model,name:purchase_request_tier_validation.model_tier_definition
104+
msgid "tier.definition"
105+
msgstr ""
106+

Diff for: purchase_request_tier_validation/models/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import purchase_request
4+
from . import tier_definition
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
from odoo import api, models
4+
5+
6+
class PurchaseRequest(models.Model):
7+
_name = "purchase.request"
8+
_inherit = ['purchase.request', 'tier.validation']
9+
_state_from = ['draft']
10+
_state_to = ['approved']
11+
12+
@api.model
13+
def _get_under_validation_exceptions(self):
14+
res = super(PurchaseRequest, self)._get_under_validation_exceptions()
15+
res.append('route_id')
16+
return res
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
from odoo import api, models
4+
5+
6+
class TierDefinition(models.Model):
7+
_inherit = "tier.definition"
8+
9+
@api.model
10+
def _get_tier_validation_model_names(self):
11+
res = super(TierDefinition, self)._get_tier_validation_model_names()
12+
res.append("purchase.request")
13+
return res
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
A default tier is created allowing Purchase Request Manager to approve Purchase
2+
Requests.
3+
4+
In addition, you may want to add more tiers, so:
5+
6+
#. Go to *Settings > Technical > Tier Validations > Tier Definition*.
7+
#. Create as many tiers as you want for Purchase Order model.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* Adria Gil <[email protected]>
2+

Diff for: purchase_request_tier_validation/readme/CREDITS.rst

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Images
2+
------
3+
4+
* Enric Tobella (logo)
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module extends the functionality of Purchase Requests to support a tier validation process.

Diff for: purchase_request_tier_validation/readme/INSTALL.rst

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This module depends on ``base_tier_validation``. You can find it at
2+
`OCA/server-ux <https://github.com/OCA/server-ux>`_

Diff for: purchase_request_tier_validation/readme/USAGE.rst

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
To use this module, you need to:
2+
3+
#. Create a Purchase Request triggering at least one "Tier Definition".
4+
#. Click on *Request Validation* button.
5+
#. Under the tab *Reviews* have a look to pending reviews and their statuses.
6+
#. Once all reviews are validated button to *Confirm* will be shown.
7+
8+
Additional features:
9+
10+
* You can filter the Purchase Request requesting your review through the filter *Needs my
11+
Review*.
12+
* User with rights to confirm the Purchase Request (validate all tiers that would
13+
be generated) can directly do the operation, this is, there is no need for
14+
her/him to request a validation.
7.33 KB
Loading

0 commit comments

Comments
 (0)