Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3715][ADD] sale_tier_validation #151

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from
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
129 changes: 129 additions & 0 deletions sale_tier_validation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
====================
Sale Tier Validation
====================

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

.. |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/16.0/sale_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-16-0/sale-workflow-16-0-sale_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/builds?repo=OCA/sale-workflow&target_branch=16.0
:alt: Try me on Runboat

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

This module extends the functionality of Sale Orders to support a tier
validation process.

**Table of contents**

.. contents::
:local:

Installation
============

This module depends on ``base_tier_validation``. You can find it at
`OCA/server-ux <https://github.com/OCA/server-ux>`__

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

To configure this module, you need to:

1. Go to *Settings > Technical > Tier Validations > Tier Definition*.
2. Create as many tiers as you want for Sale Order model.

If necessary, update the "Block Printing of Unvalidated Quotations"
under *Sales > Configuration > Settings* to block the printing of
quotation when the order has yet to be validated (disabled by default).

Usage
=====

To use this module, you need to:

1. Create a Sale Order triggering at least one "Tier Definition".
2. Click on *Request Validation* button.
3. Under the tab *Reviews* have a look to pending reviews and their
statuses.
4. Once all reviews are validated click on *Confirm Order*.

Additional features:

- You can filter the SOs requesting your review through the filter
*Needs my Review*.
- User with rights to confirm the SO (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.

Known issues / Roadmap
======================

- The sales order, when moved to the state sent, will still send the
email even if the validation is not approved by the corresponding
tier. Code to consider this particular case is not developed.

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_tier_validation%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.

Credits
=======

Authors
-------

* Open Source Integrators

Contributors
------------

- Mayank Gosai <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Sergio Teruel

- Tharathip Chaweewongphan <[email protected]>
- `Quartile <https://www.quartile.co>`__:

- Aung Ko Ko Lin

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/16.0/sale_tier_validation>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions sale_tier_validation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import reports
20 changes: 20 additions & 0 deletions sale_tier_validation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2019 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Tier Validation",
"summary": "Extends the functionality of Sale Orders to "
"support a tier validation process.",
"version": "16.0.1.0.4",
"category": "Sale",
"website": "https://github.com/OCA/sale-workflow",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["sale", "base_tier_validation"],
"data": [
"data/mail_data.xml",
"views/sale_order_view.xml",
"views/res_config_settings_views.xml",
],
}
77 changes: 77 additions & 0 deletions sale_tier_validation/data/mail_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!-- Sale order -->
<record
id="sale_order_tier_validation_requested"
model="mail.message.subtype"
forcecreate="1"
>
<field name="name">Tier Validation Requested</field>
<field name="res_model">sale.order</field>
<field name="internal">True</field>
</record>
<record
id="sale_order_tier_validation_accepted"
model="mail.message.subtype"
forcecreate="1"
>
<field name="name">Tier Validation Accepted Notification</field>
<field name="res_model">sale.order</field>
<field name="internal">True</field>
</record>
<record
id="sale_order_tier_validation_rejected"
model="mail.message.subtype"
forcecreate="1"
>
<field name="name">Tier Validation Rejected Notification</field>
<field name="res_model">sale.order</field>
<field name="internal">True</field>
</record>
<!-- CRM Team -->
<record
id="crm_team_tier_validation_requested"
model="mail.message.subtype"
forcecreate="1"
>
<field name="name">Tier Validation Requested</field>
<field name="res_model">crm.team</field>
<field name="default" eval="True" />
<field name="internal">True</field>
<field
name="parent_id"
ref="sale_tier_validation.sale_order_tier_validation_requested"
/>
<field name="relation_field">team_id</field>
</record>
<record
id="crm_team_tier_validation_accepted"
model="mail.message.subtype"
forcecreate="1"
>
<field name="name">Tier Validation Accepted Notification</field>
<field name="res_model">crm.team</field>
<field name="default" eval="True" />
<field name="internal">True</field>
<field
name="parent_id"
ref="sale_tier_validation.sale_order_tier_validation_accepted"
/>
<field name="relation_field">team_id</field>
</record>
<record
id="crm_team_tier_validation_rejected"
model="mail.message.subtype"
forcecreate="1"
>
<field name="name">Tier Validation Rejected Notification</field>
<field name="res_model">crm.team</field>
<field name="default" eval="True" />
<field
name="parent_id"
ref="sale_tier_validation.sale_order_tier_validation_rejected"
/>
<field name="internal">True</field>
<field name="relation_field">team_id</field>
</record>
</odoo>
149 changes: 149 additions & 0 deletions sale_tier_validation/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_tier_validation
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-07 11:28+0000\n"
"PO-Revision-Date: 2023-11-08 13:40+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"
"SO-Revision-Date: 2019-05-08 12:03+0000\n"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__can_review
msgid "Can Review"
msgstr "Puede Revisar"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__has_comment
msgid "Has Comment"
msgstr "Tiene Comentario"

#. module: sale_tier_validation
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter
msgid "My Sales to review"
msgstr "Mis ventas a revisar"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__need_validation
msgid "Need Validation"
msgstr "Necesita validación"

#. module: sale_tier_validation
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter
msgid "Needs my Review"
msgstr "Necesita mi Revisión"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__next_review
msgid "Next Review"
msgstr "Siguiente revisión"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__rejected
msgid "Rejected"
msgstr "Rechazado/a"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__rejected_message
msgid "Rejected Message"
msgstr "Mensaje rechazado"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__reviewer_ids
msgid "Reviewers"
msgstr "Revisores"

#. module: sale_tier_validation
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter
msgid "SOs validated and ready to be confirmed"
msgstr "SOs validadas y preparadas para ser confirmadas"

#. module: sale_tier_validation
#: model:ir.model,name:sale_tier_validation.model_sale_order
msgid "Sales Order"
msgstr "Pedidos"

#. module: sale_tier_validation
#: model:ir.model,name:sale_tier_validation.model_tier_definition
msgid "Tier Definition"
msgstr "Definición de nivel"

#. module: sale_tier_validation
#: model:mail.message.subtype,name:sale_tier_validation.crm_team_tier_validation_accepted
#: model:mail.message.subtype,name:sale_tier_validation.sale_order_tier_validation_accepted
msgid "Tier Validation Accepted Notification"
msgstr "Validación de nivel aceptada"

#. module: sale_tier_validation
#: model:mail.message.subtype,name:sale_tier_validation.crm_team_tier_validation_rejected
#: model:mail.message.subtype,name:sale_tier_validation.sale_order_tier_validation_rejected
msgid "Tier Validation Rejected Notification"
msgstr "Validación de nivel rechazada"

#. module: sale_tier_validation
#: model:mail.message.subtype,name:sale_tier_validation.crm_team_tier_validation_requested
#: model:mail.message.subtype,name:sale_tier_validation.sale_order_tier_validation_requested
msgid "Tier Validation Requested"
msgstr "Validación de nivel solicitada"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__to_validate_message
msgid "To Validate Message"
msgstr "Para validar el mensaje"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__validated
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter
msgid "Validated"
msgstr "Validada"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__validated_message
msgid "Validated Message"
msgstr "Mensaje validado"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__validation_status
msgid "Validation Status"
msgstr "Estado de la Validación"

#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__review_ids
msgid "Validations"
msgstr "Validaciones"

#~ msgid ""
#~ "<i class=\"fa fa-info-circle\"/>This SO needs to be\n"
#~ " validated."
#~ msgstr ""
#~ "<i class=\"fa fa-info-circle\"/>Esta SO debe ser\n"
#~ " validada."

#~ msgid "<i class=\"fa fa-thumbs-down\"/> Operation has been <b>rejected</b>."
#~ msgstr ""
#~ "<i class=\"fa fa-thumbs-down\"/>La operación ha sido <b>rechazada</b>."

#~ msgid "<i class=\"fa fa-thumbs-up\"/> Operation has been <b>validated</b>!"
#~ msgstr "<i class=\"fa fa-thumbs-up\"/>La operación ha sido <b>validada</b>!"

#~ msgid "Reject"
#~ msgstr "Rechazar"

#~ msgid "Request Validation"
#~ msgstr "Solicitar Validación"

#~ msgid "Restart Validation"
#~ msgstr "Reiniciar Validación"

#~ msgid "Validate"
#~ msgstr "Validar"
Loading
Loading