Partner Archive Propagate

partner_archive_propagate
REPOSITORY
REPOSITORYOCA/partner-contact
GIT
GIThttps://github.com/OCA/partner-contact.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/partner-contact/tree/18.0/partner_archive_propagate
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYPartner Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSOCA-git-bot, Nikos Tsirintanis, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/partner-contact
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
    - mail
    - bus
    - web_tour
    - html_editor
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
## 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.).

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_archive_propagate_wizard_form res.partner.archive.propagate.wizard.form res.partner.archive.propagate.wizard form New
view_partner_form_inherit_archive_propagate res.partner.form.archive.propagate res.partner xpath Inherits base.view_partner_form
view_res_config_settings_partner_archive res.config.settings.view.form.partner.archive res.config.settings block Inherits base_setup.res_config_settings_view_form
Models touched (4)

New fields (1)
  • partner_archive_force_outside_ui Boolean
    config_parameter='partner_archive_propagate.force_outside_ui' default=False help='If enabled, archiving a partner via any non-UI method (imports, RPC, automated) will also archive all descendants and mark them as propagated.' string='Force propagation outside UI'
Public methods (0)

No public methods.

New fields (2)
  • propagated_from_id Many2one → res.partner
    help='Technical field. Set when this partner was archived automatically because the source partner was archived. Cleared again when it is unarchived by the opposite propagation.' index=True string='Archived Due To' args: 'res.partner'
  • show_prop_wizard_button Boolean
    compute='_compute_show_prop_wizard_button' help='Show or hide the wizard button, depending on child_ids'
Public methods (3)
  • action_archive(self)
    Archive only this partner via gear Do not super, otherwise core odoo archives children too
  • action_archive_with_contacts(self)
    Show wizard only if there are type contact descendants. - If there are no type contact descendants: archive immediately. - If there are type contact descendants: open wizard listing only those, allowing the user to exclude some.
  • write(self, vals)
    Enable (un)archiving propagation: - detect which partners are being (un)archived - calls _(un)archive_propagate() on them.

New fields (5)
  • email Char
    related='partner_id.email'
  • name Char
    related='partner_id.name'
  • partner_id Many2one → res.partner
    required=True string='Contact' args: 'res.partner'
  • phone Char
    related='partner_id.phone'
  • wizard_id Many2one → res.partner.archive.propagate.wizard
    ondelete='cascade' required=True args: 'res.partner.archive.propagate.wizard'
Public methods (0)

No public methods.

New fields (2)
  • line_ids One2many → res.partner.archive.propagate.line
    string='Contacts to archive' args: 'res.partner.archive.propagate.line', 'wizard_id'
  • partner_id Many2one → res.partner
    readonly=True required=True args: 'res.partner'
Public methods (1)
  • action_confirm(self)
    Archive main partner from the ui: - silently archive NON-contact type descendants (invoice/delivery/etc) - skip descendants linked to active users and notify
REPOSITORY
REPOSITORYOCA/partner-contact
GIT
GIThttps://github.com/OCA/partner-contact.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/partner-contact/tree/16.0/partner_archive_propagate
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYPartner Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, Nikos Tsirintanis, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/partner-contact
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:43
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_archive_propagate_wizard_form res.partner.archive.propagate.wizard.form res.partner.archive.propagate.wizard form New
view_partner_form_inherit_archive_propagate res.partner.form.archive.propagate res.partner xpath Inherits base.view_partner_form
view_res_config_settings_partner_archive res.config.settings.view.form.partner.archive res.config.settings xpath Inherits base.res_config_settings_view_form
Models touched (4)

New fields (1)
  • partner_archive_force_outside_ui Boolean
    config_parameter='partner_archive_propagate.force_outside_ui' default=False help='If enabled, archiving a partner via any non-UI method (imports, RPC, automated) will also archive all descendants and mark them as propagated.' string='Force propagation outside UI'
Public methods (0)

No public methods.

New fields (2)
  • propagated_from_id Many2one → res.partner
    help='Technical field. Set when this partner was archived automatically because the source partner was archived. Cleared again when it is unarchived by the opposite propagation.' index=True string='Archived Due To' args: 'res.partner'
  • show_prop_wizard_button Boolean
    compute='_compute_show_prop_wizard_button' help='Show or hide the wizard button, depending on child_ids'
Public methods (3)
  • action_archive(self)
    Archive only this partner via gear Do not super, otherwise core odoo archives children too
  • action_archive_with_contacts(self)
    Show wizard only if there are type contact descendants. - If there are no type contact descendants: archive immediately. - If there are type contact descendants: open wizard listing only those, allowing the user to exclude some.
  • write(self, vals)
    Enable (un)archiving propagation: - detect which partners are being (un)archived - calls _(un)archive_propagate() on them.

New fields (5)
  • email Char
    related='partner_id.email'
  • name Char
    related='partner_id.name'
  • partner_id Many2one → res.partner
    required=True string='Contact' args: 'res.partner'
  • phone Char
    related='partner_id.phone'
  • wizard_id Many2one → res.partner.archive.propagate.wizard
    ondelete='cascade' required=True args: 'res.partner.archive.propagate.wizard'
Public methods (0)

No public methods.

New fields (2)
  • line_ids One2many → res.partner.archive.propagate.line
    string='Contacts to archive' args: 'res.partner.archive.propagate.line', 'wizard_id'
  • partner_id Many2one → res.partner
    readonly=True required=True args: 'res.partner'
Public methods (1)
  • action_confirm(self)
    Archive main partner from the ui: - silently archive NON-contact type descendants (invoice/delivery/etc) - skip descendants linked to active users and notify