Metadata-Version: 2.4
Name: odoo-addon-fraud_service_disconnection_somconnexio
Version: 16.0.1.0.1
Summary: Automation of service disconnection due to first invoice defaults (fraud circuit) within the SomConnexió ERP.
Home-page: https://github.com/Som-IT/somconnexio-fraud-circuit
Author: Odoo Community Association (OCA), Som IT Cooperatiu SCCL, Som Connexió SCCL
Author-email: support@odoo-community.org
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: mm_proxy_python_client>=0.1.2
Requires-Dist: mock
Requires-Dist: odoo-addon-account_credit_control<16.1dev,>=16.0dev
Requires-Dist: odoo-addon-account_payment_return<16.1dev,>=16.0dev
Requires-Dist: odoo-addon-invoice_somconnexio<16.1dev,>=16.0dev
Requires-Dist: odoo-addon-somconnexio<16.1dev,>=16.0dev
Requires-Dist: odoo<16.1dev,>=16.0a
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

##########################################
 Fraud Service Disconnection 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 automate the fraud circuit for first invoice defaults in Som
Connexió.

**Table of contents**

.. contents::
   :local:

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

Credential configuration is performed strictly through **Environment
Variables** (standard library `mm_proxy_python_client`):

-  `MM_PROXY_BASEURL`
-  `MM_PROXY_USER`
-  `MM_PROXY_PASSWORD`

No additional configuration is required in the Odoo dashboard.

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

This module **proactively detects fraud or early payment defaults (first
invoice)** and streamline operational actions (service disconnection)
and administrative tasks (task generation) without manual intervention.

1. Scenario: Receipt of Bank Return (Non-Payment)
=================================================

-  When the finance department confirms a return (`payment.return`), the
   system verifies the customer's history. If it is their first invoice,
   it automatically creates a Task in the Fraud project linked to their
   Contract. This task creation also triggers a mail notification to the
   insolvent partner, warning them to pay their debt.

2. Scenario: Service Disconnection
==================================

-  When a cron job detects that the task has been inactive (no payment
   recieved) for a certain period of time, it triggers an action to
   disconnect the service. Odoo invokes the ProxyMM Python client. If
   the API responds correctly, the task status changes to
   "Disconnected". This disconnection action can also be triggered
   manually by the operator through a button in the task form view.

3. Scenario: Payment and Reactivation
=====================================

-  When the customer pays the outstanding debt (invoice reconciliation),
   the billing team can then trigger the "Reactivate" signal (via Python
   client) and update the task to "Reactivated". This allows for quick
   service restoration when the situation is regularized, improving
   customer experience.

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

-  ``Som IT Cooperatiu SCCL <https://somit.coop//>``

   -  Nicolás Ramos nicolas.ramos@somit.coop

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

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