Metadata-Version: 2.1
Name: odoo-addon-partner_archive_propagate
Version: 16.0.1.1.0.1
Summary: Archive/unarchive partner contacts hierarchically
Home-page: https://github.com/OCA/partner-contact
Author: Therp BV, Odoo Community Association (OCA)
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: odoo<16.1dev,>=16.0a

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

=========================
Partner Archive Propagate
=========================

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

.. |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/license-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%2Fpartner--contact-lightgray.png?logo=github
    :target: https://github.com/OCA/partner-contact/tree/16.0/partner_archive_propagate
    :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_archive_propagate
    :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
    :alt: Try me on Runboat

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

===========================
Partner Archive Propagation
===========================

This module extends the native archiving mechanism for partners.

When archiving a company or parent contact, it will also handle its descendants
according to business rules — with user control and safeguards.

Features
--------

* Adds a new **"Archive Contact and Children"** button on the Partner form.
* Shows a **wizard** listing contact-type descendants before archiving.
* Automatically skips descendants linked to active users.
* Adds a technical Many2one field (propagated_from_id) that records which parent partner caused the automatic archiving, making propagation fully traceable and reversible.
* Ensures automatic unarchive propagation.
* Includes a system setting to enforce propagation even for non-UI actions
  (imports, RPC, automated jobs, etc.).

**Table of contents**

.. contents::
   :local:

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

* Go to **Settings → Technical → General Settings → Partner Archive Propagate**.
* Enable *"Force propagation outside UI"* to automatically apply propagation
  when partners are archived through automation or imports.

Usage
=====

1. Open a partner (company or main contact).
2. Click the **"Archive Contact and Children"** button.
3. Review the list of child contacts to be archived.
4. Confirm the action.  
   * Non-contact types (e.g., invoice/delivery addresses) are archived silently.
   * Contact-type descendants appear in the wizard for review.

Unarchiving also follows propagation rules:  
if a parent partner is unarchived, its propagated descendants are unarchived as well.

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_archive_propagate%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
~~~~~~~

* Therp BV

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

* Nikos Tsirintanis <ntsirintanis@therp.nl>

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.

.. |maintainer-ntsirintanis| image:: https://github.com/ntsirintanis.png?size=40px
    :target: https://github.com/ntsirintanis
    :alt: ntsirintanis

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ntsirintanis| 

This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/16.0/partner_archive_propagate>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
