Metadata-Version: 2.4
Name: odoo-addon-fraud_management_somconnexio
Version: 16.0.1.1.2
Summary: Manages fraud detection and consequences within the SomConnexió ERP.
Home-page: https://somconnexio.coop/
Author: Som Connexió SCCL, Coopdevs Treball SCCL
License: AGPL-3
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 16.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Requires-Python: >=3.10
Requires-Dist: odoo-addon-cooperator_somconnexio<16.1dev,>=16.0dev
Requires-Dist: odoo-addon-crm_lead_dms_somconnexio<16.1dev,>=16.0dev
Requires-Dist: odoo-addon-somconnexio<16.1dev,>=16.0dev
Requires-Dist: odoo<16.1dev,>=16.0a
Requires-Dist: openupgradelib==3.11.1
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

###############################
 Fraud Management Som Connexió
###############################

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
   :alt: Beta
   :target: https://odoo-community.org/page/development-status

.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
   :alt: License: AGPL-3
   :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html

.. |badge3| image:: https://img.shields.io/badge/gitlab-coopdevs%2Fodoo--somconnexio-lightgray.png?logo=gitlab
   :alt: coopdevs/som-connexio/odoo-somconnexio
   :target: https://git.coopdevs.org/coopdevs/som-connexio/odoo-somconnexio

|badge1| |badge2| |badge3|

Module to detect fraud suspicion and manage fraud risk levels in CRM
leads for Som Connexió. New crm lead stage is created to be manually
reviewed for fraud risk when a new lead arrives under fraud suspicion
conditions.

It also inherits from ``crm_lead_dms_somconnexio``, requiring extra
documentation on top of it depending on the lead's fraud risk level.

**Table of contents**

.. contents::
   :local:

*******************
 Fraud risk levels
*******************

``fraud_risk_level`` is computed on each ``crm.lead`` when it is created
or when its partner, subscription request, contact data or lines change.
The levels are evaluated in the following order, and the first matching
one is assigned:

-  **R5 - Critical Risk**: the partner has the "Non payer" tag, or the
   lead shares an IBAN, e-mail or phone with a partner that has it.

-  **R4 - High Risk - insolvency**: the partner has the "Irregular
   Payer" tag, or an accumulated debt above 50 €.

-  **R0 - No Risk**: any of these conditions is met:

   -  The partner has active contracts.

   -  The lead is a broadband location change.

   -  The partner or the subscription request of the lead:

      -  is a company,
      -  is sponsored by a partner with active contracts, or
      -  comes from a cooperative agreement other than SC.

   Both the partner and the subscription request are checked, as many
   leads lack a partner at their creation and others lack a subscription
   request.

-  **R3 - High Risk**: only mobile lines, all of them new numbers.

-  **R2 - Medium Risk**: at least one fiber line as a new registration.

-  **R1 - Low Risk**: any other case, e.g. only fiber portabilities, or
   mobile lines with at least one portability.

Levels R2, R3 and R4 move the lead to the "Fraud Suspected" stage (see
*Configuration*), and R2 and R3 require extra documentation (see
*Required documentation*).

***************
 Configuration
***************

Go to Technical Settings > Automated Actions and search for the "Move
lead to Fraud Suspected Stage" action.

In code, set which fraud risk levels should move the lead to the "Fraud
Suspected" stage. By default, levels R2, R3 and R4 are set.

*********************
 Document categories
*********************

On top of the categories provided by ``crm_lead_dms_somconnexio``, it
creates two more ``dms.category`` records, as children of the ``personal
data`` and ``lead_data`` categories provided by
``crm_lead_personal_file_data``:

-  **Certificat de titularitat bancària** (``code``:
   ``certificat_titularitat_bancaria``)
-  **Factura de subministrament del domicili** (``code``:
   ``factura_subministrament_domicili``)

Required documentation
======================

``_compute_dms_category_ids`` is extended to add these categories to
``dms_category_ids`` on top of the ones already computed by
``crm_lead_dms_somconnexio``, once the lead's ``fraud_risk_level`` is
computed:

-  **Certificat de titularitat bancària**: required for fraud risk
   levels **R2** and **R3**.
-  **Factura de subministrament de l'adreça**: required for fraud risk
   level **R2**.

*******
 Usage
*******

Review leads automatically moved to the "Fraud Suspected" stage before
moving on with the provisioning of their services. Move them back to
"New" stage through the header button when the fraud risk level is
reviewed and accepted, or cancel the lead if it is rejected.

**************
 Contributors
**************

-  ``Coopdevs Treball SCCL <https://coopdevs.coop/>``

   -  Daniel Palomar daniel.palomar@coopdevs.org

-  ``Som Connexió SCCL <https://somconnexio.coop/>``

   -  Gerard Funonsas gerard.funosas@somconnexio.coop
   -  Borja Gimeno borja.gimeno@somconnexio.coop
