-
-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] partner_tier_validation: pre-commit stuff
- Loading branch information
Showing
11 changed files
with
117 additions
and
112 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 |
---|---|---|
|
@@ -17,29 +17,29 @@ Partner Tier 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%2Fpartner--contact-lightgray.png?logo=github | ||
:target: https://github.com/OCA/partner-contact/tree/16.0/partner_tier_validation | ||
:target: https://github.com/OCA/partner-contact/tree/17.0/partner_tier_validation | ||
:alt: OCA/partner-contact | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_tier_validation | ||
:target: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_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/partner-contact&target_branch=16.0 | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/partner-contact&target_branch=17.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Adds an approval workflow to Partners. | ||
The default rule requires new company Contacts to be approved | ||
before they can be used. | ||
Adds an approval workflow to Partners. The default rule requires new | ||
company Contacts to be approved before they can be used. | ||
|
||
The rule can be extended to new non-company contact, | ||
but beware that may cause issues with automatically created new contacts, | ||
such as the ones generated when processing incoming emails. | ||
The rule can be extended to new non-company contact, but beware that may | ||
cause issues with automatically created new contacts, such as the ones | ||
generated when processing incoming emails. | ||
|
||
If the 'Is Company' or 'Parent' field changes then the contact is Request | ||
for approval. | ||
If the 'Is Company' or 'Parent' field changes then the contact is | ||
Request for approval. | ||
|
||
For this, the new Contact record is kept as "Archived" until it is approved. | ||
For this, the new Contact record is kept as "Archived" until it is | ||
approved. | ||
|
||
**Table of contents** | ||
|
||
|
@@ -50,65 +50,64 @@ Installation | |
============ | ||
|
||
This module depends on ``base_tier_validation``. You can find it at | ||
`OCA/server-ux <https://github.com/OCA/server-ux>`_ | ||
`OCA/server-ux <https://github.com/OCA/server-ux>`__ | ||
|
||
Usage | ||
===== | ||
|
||
Before using, check Contact Stages configuration, | ||
to ensure that the default stage has the "Related State" field | ||
set to "To Approve". | ||
For example, having the "Draft" stage the default ensures this. | ||
Before using, check Contact Stages configuration, to ensure that the | ||
default stage has the "Related State" field set to "To Approve". For | ||
example, having the "Draft" stage the default ensures this. | ||
|
||
A regular user creates a new Contact and sends it for approval: | ||
|
||
#. Create a Contact triggering at least one "Tier Definition". | ||
The Contact will be in Draft state and marked as Archived until approved. | ||
#. Click on *Request Validation* button. | ||
#. In the *Reviews* section, at the bottom of the form, inspect the pending reviews and their status. | ||
|
||
1. Create a Contact triggering at least one "Tier Definition". The | ||
Contact will be in Draft state and marked as Archived until approved. | ||
2. Click on *Request Validation* button. | ||
3. In the *Reviews* section, at the bottom of the form, inspect the | ||
pending reviews and their status. | ||
|
||
The approver reviews Contacts to approve: | ||
|
||
#. Navigate to the Contacts app, and select the filter "Needs my Approval" | ||
#. Open the Contact form to approve. It will display a | ||
"This Records needs to be validated" banner, with "Validate" and "Reject" options. | ||
#. The approver can change the state to "Active". | ||
This will automatically unarchive the record and make it available to be used. | ||
|
||
1. Navigate to the Contacts app, and select the filter "Needs my | ||
Approval" | ||
2. Open the Contact form to approve. It will display a "This Records | ||
needs to be validated" banner, with "Validate" and "Reject" options. | ||
3. The approver can change the state to "Active". This will | ||
automatically unarchive the record and make it available to be used. | ||
|
||
The Approve/Reject actions do not automatically change the State. | ||
This could be a future improvement. | ||
The Approve/Reject actions do not automatically change the State. This | ||
could be a future improvement. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/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/partner-contact/issues/new?body=module:%20partner_tier_validation%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_tier_validation%0Aversion:%2017.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 | ||
~~~~~~~~~~~~ | ||
------------ | ||
|
||
* `Open Source Integrators <https://opensourceintegrators.com>`_. | ||
- `Open Source Integrators <https://opensourceintegrators.com>`__. | ||
|
||
* Antonio Yamuta <[email protected]> | ||
* Daniel Reis <[email protected]> | ||
* Urvisha Desai <[email protected]> | ||
- Antonio Yamuta <[email protected]> | ||
- Daniel Reis <[email protected]> | ||
- Urvisha Desai <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
----------- | ||
|
||
This module is maintained by the OCA. | ||
|
||
|
@@ -128,6 +127,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | |
|
||
|maintainer-dreispt| | ||
|
||
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/16.0/partner_tier_validation>`_ project on GitHub. | ||
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/17.0/partner_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,3 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
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 @@ | ||
- [Open Source Integrators](https://opensourceintegrators.com). | ||
- Antonio Yamuta \<<[email protected]>\> | ||
- Daniel Reis \<<[email protected]>\> | ||
- Urvisha Desai \<<[email protected]>\> |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
Adds an approval workflow to Partners. The default rule requires new | ||
company Contacts to be approved before they can be used. | ||
|
||
The rule can be extended to new non-company contact, but beware that may | ||
cause issues with automatically created new contacts, such as the ones | ||
generated when processing incoming emails. | ||
|
||
If the 'Is Company' or 'Parent' field changes then the contact is | ||
Request for approval. | ||
|
||
For this, the new Contact record is kept as "Archived" until it is | ||
approved. |
This file was deleted.
Oops, something went wrong.
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 depends on `base_tier_validation`. You can find it at | ||
[OCA/server-ux](https://github.com/OCA/server-ux) |
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
Before using, check Contact Stages configuration, to ensure that the | ||
default stage has the "Related State" field set to "To Approve". For | ||
example, having the "Draft" stage the default ensures this. | ||
|
||
A regular user creates a new Contact and sends it for approval: | ||
|
||
1. Create a Contact triggering at least one "Tier Definition". The | ||
Contact will be in Draft state and marked as Archived until | ||
approved. | ||
2. Click on *Request Validation* button. | ||
3. In the *Reviews* section, at the bottom of the form, inspect the | ||
pending reviews and their status. | ||
|
||
The approver reviews Contacts to approve: | ||
|
||
1. Navigate to the Contacts app, and select the filter "Needs my | ||
Approval" | ||
2. Open the Contact form to approve. It will display a "This Records | ||
needs to be validated" banner, with "Validate" and "Reject" options. | ||
3. The approver can change the state to "Active". This will | ||
automatically unarchive the record and make it available to be used. | ||
|
||
The Approve/Reject actions do not automatically change the State. This | ||
could be a future improvement. |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,10 +8,11 @@ | |
|
||
/* | ||
:Author: David Goodger ([email protected]) | ||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ | ||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ | ||
:Copyright: This stylesheet has been placed in the public domain. | ||
Default cascading style sheet for the HTML output of Docutils. | ||
Despite the name, some widely supported CSS2 features are used. | ||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to | ||
customize this style sheet. | ||
|
@@ -274,7 +275,7 @@ | |
margin-left: 2em ; | ||
margin-right: 2em } | ||
|
||
pre.code .ln { color: grey; } /* line numbers */ | ||
pre.code .ln { color: gray; } /* line numbers */ | ||
pre.code, code { background-color: #eeeeee } | ||
pre.code .comment, code .comment { color: #5C6576 } | ||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } | ||
|
@@ -300,7 +301,7 @@ | |
span.pre { | ||
white-space: pre } | ||
|
||
span.problematic { | ||
span.problematic, pre.problematic { | ||
color: red } | ||
|
||
span.section-subtitle { | ||
|
@@ -368,16 +369,16 @@ <h1 class="title">Partner Tier Validation</h1> | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:930cc26243226cbf43d923b5d31be3b293d7e95643548c905d2dbe109a5116f1 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> | ||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/partner-contact/tree/16.0/partner_tier_validation"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_tier_validation"><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/partner-contact&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p> | ||
<p>Adds an approval workflow to Partners. | ||
The default rule requires new company Contacts to be approved | ||
before they can be used.</p> | ||
<p>The rule can be extended to new non-company contact, | ||
but beware that may cause issues with automatically created new contacts, | ||
such as the ones generated when processing incoming emails.</p> | ||
<p>If the ‘Is Company’ or ‘Parent’ field changes then the contact is Request | ||
for approval.</p> | ||
<p>For this, the new Contact record is kept as “Archived” until it is approved.</p> | ||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/partner-contact/tree/17.0/partner_tier_validation"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_tier_validation"><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/partner-contact&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p> | ||
<p>Adds an approval workflow to Partners. The default rule requires new | ||
company Contacts to be approved before they can be used.</p> | ||
<p>The rule can be extended to new non-company contact, but beware that may | ||
cause issues with automatically created new contacts, such as the ones | ||
generated when processing incoming emails.</p> | ||
<p>If the ‘Is Company’ or ‘Parent’ field changes then the contact is | ||
Request for approval.</p> | ||
<p>For this, the new Contact record is kept as “Archived” until it is | ||
approved.</p> | ||
<p><strong>Table of contents</strong></p> | ||
<div class="contents local topic" id="contents"> | ||
<ul class="simple"> | ||
|
@@ -399,34 +400,35 @@ <h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1> | |
</div> | ||
<div class="section" id="usage"> | ||
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1> | ||
<p>Before using, check Contact Stages configuration, | ||
to ensure that the default stage has the “Related State” field | ||
set to “To Approve”. | ||
For example, having the “Draft” stage the default ensures this.</p> | ||
<p>Before using, check Contact Stages configuration, to ensure that the | ||
default stage has the “Related State” field set to “To Approve”. For | ||
example, having the “Draft” stage the default ensures this.</p> | ||
<p>A regular user creates a new Contact and sends it for approval:</p> | ||
<ol class="arabic simple"> | ||
<li>Create a Contact triggering at least one “Tier Definition”. | ||
The Contact will be in Draft state and marked as Archived until approved.</li> | ||
<li>Create a Contact triggering at least one “Tier Definition”. The | ||
Contact will be in Draft state and marked as Archived until approved.</li> | ||
<li>Click on <em>Request Validation</em> button.</li> | ||
<li>In the <em>Reviews</em> section, at the bottom of the form, inspect the pending reviews and their status.</li> | ||
<li>In the <em>Reviews</em> section, at the bottom of the form, inspect the | ||
pending reviews and their status.</li> | ||
</ol> | ||
<p>The approver reviews Contacts to approve:</p> | ||
<ol class="arabic simple"> | ||
<li>Navigate to the Contacts app, and select the filter “Needs my Approval”</li> | ||
<li>Open the Contact form to approve. It will display a | ||
“This Records needs to be validated” banner, with “Validate” and “Reject” options.</li> | ||
<li>The approver can change the state to “Active”. | ||
This will automatically unarchive the record and make it available to be used.</li> | ||
<li>Navigate to the Contacts app, and select the filter “Needs my | ||
Approval”</li> | ||
<li>Open the Contact form to approve. It will display a “This Records | ||
needs to be validated” banner, with “Validate” and “Reject” options.</li> | ||
<li>The approver can change the state to “Active”. This will | ||
automatically unarchive the record and make it available to be used.</li> | ||
</ol> | ||
<p>The Approve/Reject actions do not automatically change the State. | ||
This could be a future improvement.</p> | ||
<p>The Approve/Reject actions do not automatically change the State. This | ||
could be a future improvement.</p> | ||
</div> | ||
<div class="section" id="bug-tracker"> | ||
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1> | ||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/partner-contact/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/partner-contact/issues/new?body=module:%20partner_tier_validation%0Aversion:%2016.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/partner-contact/issues/new?body=module:%20partner_tier_validation%0Aversion:%2017.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"> | ||
|
@@ -451,13 +453,15 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2> | |
<div class="section" id="maintainers"> | ||
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2> | ||
<p>This module is maintained by the OCA.</p> | ||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> | ||
<a class="reference external image-reference" href="https://odoo-community.org"> | ||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /> | ||
</a> | ||
<p>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.</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/dreispt"><img alt="dreispt" src="https://github.com/dreispt.png?size=40px" /></a></p> | ||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/16.0/partner_tier_validation">OCA/partner-contact</a> project on GitHub.</p> | ||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/17.0/partner_tier_validation">OCA/partner-contact</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> | ||
|