Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
796 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
======================= | ||
Invoice Tier Validation | ||
======================= | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/LGPL-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/11.0/account_invoice_tier_validation | ||
: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-11-0/account-invoicing-11-0-account_invoice_tier_validation | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/95/11.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module extends the functionality of Invoices to support a tier | ||
validation process. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
#. Go to *Settings > Technical > Tier Validations > Tier Definition*. | ||
#. Create as many tiers as you want for Invoice model. | ||
|
||
Usage | ||
===== | ||
|
||
#. Create a Invoice triggering at least one "Tier Definition". | ||
#. Click on *Request Validation* button. | ||
#. Under the tab *Reviews* have a look to pending reviews and their statuses. | ||
#. Once all reviews are validated click on *Confirm Order*. | ||
|
||
Additional features: | ||
|
||
* You can filter the Invoices requesting your review through the filter *Needs my | ||
Review*. | ||
* User with rights to confirm the PO (validate all tiers that would | ||
be generated) can directly do the operation, this is, there is no need for | ||
her/him to request a validation. | ||
|
||
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 smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_invoice_tier_validation%0Aversion:%2011.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 | ||
~~~~~~~ | ||
|
||
* ForgeFlow | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Aaron Henriquez <ahenriquez@ForgeFlow.com> | ||
|
||
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/account-invoicing <https://github.com/OCA/account-invoicing/tree/11.0/account_invoice_tier_validation>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2020 ForgeFlow S.L. | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
{ | ||
"name": "Invoice Tier Validation", | ||
"summary": "Extends the functionality of Invoice to " | ||
"support a tier validation process.", | ||
"version": "11.0.1.0.0", | ||
"category": "Invoices", | ||
"website": "https://github.com/OCA/account-invoicing", | ||
"author": "ForgeFlow, Odoo Community Association (OCA)", | ||
"license": "LGPL-3", | ||
"installable": True, | ||
"depends": ["account", "base_tier_validation",], | ||
"data": [ | ||
"data/account_invoice_tier_definition.xml", | ||
"views/account_invoice_view.xml", | ||
], | ||
} |
12 changes: 12 additions & 0 deletions
12
account_invoice_tier_validation/data/account_invoice_tier_definition.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- Copyright 2020 ForgeFlow S.L. | ||
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). --> | ||
<odoo noupdate="1"> | ||
<record id="account_invoice_default_tier_definition" model="tier.definition"> | ||
<field name="model_id" ref="model_account_invoice"/> | ||
<field name="definition_type">domain</field> | ||
<field name="definition_domain"/> | ||
<field name="review_type">group</field> | ||
<field name="reviewer_group_id" ref='account.group_account_manager'/> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import account_invoice | ||
from . import tier_definition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2020 ForgeFlow S.L. | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import api, models | ||
|
||
|
||
class AccountInvoice(models.Model): | ||
_name = "account.invoice" | ||
_inherit = ["account.invoice", "tier.validation"] | ||
_state_from = ["draft"] | ||
_state_to = ["open", "paid"] | ||
|
||
@api.model | ||
def _get_under_validation_exceptions(self): | ||
res = super(AccountInvoice, self)._get_under_validation_exceptions() | ||
res.append("route_id") | ||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2020 ForgeFlow S.L. | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import api, models | ||
|
||
|
||
class TierDefinition(models.Model): | ||
_inherit = "tier.definition" | ||
|
||
@api.model | ||
def _get_tier_validation_model_names(self): | ||
res = super(TierDefinition, self)._get_tier_validation_model_names() | ||
res.append("account.invoice") | ||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
To configure this module, you need to: | ||
|
||
#. Go to *Settings > Technical > Tier Validations > Tier Definition*. | ||
#. Create as many tiers as you want for Invoice model. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Aaron Henriquez <ahenriquez@ForgeFlow.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module extends the functionality of Invoices to support a tier | ||
validation process. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#. Create a Invoice triggering at least one "Tier Definition". | ||
#. Click on *Request Validation* button. | ||
#. Under the tab *Reviews* have a look to pending reviews and their statuses. | ||
#. Once all reviews are validated click on *Confirm Order*. | ||
|
||
Additional features: | ||
|
||
* You can filter the Invoices requesting your review through the filter *Needs my | ||
Review*. | ||
* User with rights to confirm the PO (validate all tiers that would | ||
be generated) can directly do the operation, this is, there is no need for | ||
her/him to request a validation. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.