Skip to content

Commit

Permalink
Merge PR OCA#2368 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Feb 15, 2024
2 parents 7c8567d + f1eea2b commit 0bc0830
Show file tree
Hide file tree
Showing 17 changed files with 852 additions and 0 deletions.
105 changes: 105 additions & 0 deletions sale_missing_tracking_tier_validation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
====================
Sale 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/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_missing_tracking_tier_validation
: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_missing_tracking_tier_validation
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/sale-workflow&target_branch=15.0
:alt: Try me on Runboat

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

This module extends the functionality of Sale missing tracking exceptions 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 Sale missing tracking exception model.

Usage
=====

To use this module, you need to:

#. Create a Sale missing cart tracking exceptions 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 *Approve exception*.

Additional features:

* You can filter the Sale missing cart tracking exceptions requesting your
review through the filter *Needs my Review*.
* User with rights to confirm the exceptions (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/sale-workflow/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/sale-workflow/issues/new?body=module:%20sale_missing_tracking_tier_validation%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
~~~~~~~

* Tecnativa

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

* `Tecnativa <https://www.tecnativa.com>`__:

* Carlos Dauden
* Sergio Teruel
* Pilar Vargas

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_missing_tracking_tier_validation>`_ 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_missing_tracking_tier_validation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions sale_missing_tracking_tier_validation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2021 Tecnativa - Carlos Dauden
# Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Sale Missing Tracking Tier Validation",
"summary": "Extends the functionality of Sale missing tracking exceptions to "
"support a tier validation process.",
"version": "15.0.1.0.0",
"category": "Sale",
"website": "https://github.com/OCA/sale-workflow",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["sale_missing_tracking", "base_tier_validation"],
"data": ["views/sale_missing_tracking_exception_view.xml"],
}
2 changes: 2 additions & 0 deletions sale_missing_tracking_tier_validation/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import sale_missing_tracking_exception
from . import tier_definition
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2021 Tecnativa - Carlos Dauden
# Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class SaleMissingTrackingException(models.Model):
_inherit = ["sale.missing.tracking.exception", "tier.validation"]
_name = "sale.missing.tracking.exception"
_state_from = ["request"]
_state_to = ["approved"]

def action_request(self):
self.request_validation()
15 changes: 15 additions & 0 deletions sale_missing_tracking_tier_validation/models/tier_definition.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2021 Tecnativa - Carlos Dauden
# Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, models


class TierDefinition(models.Model):
_inherit = "tier.definition"

@api.model
def _get_tier_validation_model_names(self):
res = super()._get_tier_validation_model_names()
res.append("sale.missing.tracking.exception")
return res
4 changes: 4 additions & 0 deletions sale_missing_tracking_tier_validation/readme/CONFIGURE.rst
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 Sale missing tracking exception model.
5 changes: 5 additions & 0 deletions sale_missing_tracking_tier_validation/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* `Tecnativa <https://www.tecnativa.com>`__:

* Carlos Dauden
* Sergio Teruel
* Pilar Vargas
2 changes: 2 additions & 0 deletions sale_missing_tracking_tier_validation/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module extends the functionality of Sale missing tracking exceptions to support a tier
validation process.
15 changes: 15 additions & 0 deletions sale_missing_tracking_tier_validation/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
To use this module, you need to:

#. Create a Sale missing cart tracking exceptions 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 *Approve exception*.

Additional features:

* You can filter the Sale missing cart tracking exceptions requesting your
review through the filter *Needs my Review*.
* User with rights to confirm the exceptions (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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0bc0830

Please sign in to comment.