Skip to Content

← Back to templates

// TEMPLATE · ERP

Archive Inactive Partners

Reads active partners from Odoo, calculates how many days have passed since each record was last updated, and automatically archives those that have been inactive beyond a configurable threshold — keeping your contact database clean without manual intervention.

USES

Odoo InputOdoo Update

ERPCRMMaintenance6 transformsApache Hop

Get access

Apache Hop pipeline (.hpl)
Available to Putki subscribers

Pipeline

read-active-partners
OdooInput
Putki

→

calculate-days-inactive
ScriptValueMod

→

get-threshold
GetVariable

→

filter-by-threshold
FilterRows

→

set-inactive
Constant

→

archive-partners
OdooUpdate
Putki

How it works

This pipeline runs on a schedule and automatically archives Odoo partners that have had no activity for longer than a configurable number of days. Archived records are hidden from default Odoo views but remain in the database — nothing is deleted. Set the threshold once and your contact list stays clean without anyone having to touch it.

Archiving is reversible. Setting active = False in Odoo hides the record from default views but does not delete it. You can unarchive any record manually or by running a reverse pipeline. Review the filter parameters before the first production run.

1

Read partners from Odoo

The Putki Odoo Input plugin reads partners from res.partner excluding any record linked to an active internal user — user_ids = False. This prevents the pipeline from attempting to archive partners that Odoo would reject because they have an active login account attached.

2

Calculate days of inactivity

A ScriptValueMod transform parses each partner's write_date — the timestamp of the last modification to the record — and calculates how many days have elapsed since then. The result is added to the stream as the integer field days_inactive.

3

Filter by the configured threshold

A GetVariable transform reads the INACTIVITY_DAYS pipeline parameter and adds it to the stream as inactivity_days. FilterRows then keeps only the partners whose days_inactive exceeds that value. All others pass through without being touched.

4

Archive in Odoo

A Constant transform adds the boolean field active = false to each qualifying row. The Putki Odoo Update plugin writes that value to Odoo using the partner's internal id as the key — setting active = False on res.partner and archiving the record. Records are processed in batches of 100.

What you need

•

Putki subscription

Access to the Odoo Input and Odoo Update plugins, both included in all Putki tiers.

•

Odoo API access

An Odoo user with read and write access to res.partner, plus your database URL and API key. The Odoo user must have permission to archive records.

•

Test before going to production

Set INACTIVITY_DAYS to a small value on first run and review which records are selected before running at full scale. The default is 365 days — adjust the search domain to match your definition of inactive if needed.

PARAMETERS

INACTIVITY_DAYS
Days without write activity before a partner is archived
default: 365

ODOO_CONNECTION
Name of the Odoo connection in your Hop project metadata
default: odoo

DETAILS

Type
Pipeline (.hpl)

Transforms
6

Odoo model
res.partner

Putki version
2026.03+

Created
May 18, 2026

USE CASE

Automatically archive Odoo partners that have had no activity beyond a configurable threshold. Keeps your contact list clean on a schedule — archived records remain fully recoverable.

SCHEDULE SUGGESTION

Run monthly via a Putki workflow. On first execution, set INACTIVITY_DAYS to a small value to preview which records would be affected before running at full scale.

Want this template running on your data?

Templates come with a Putki subscription. Tell us what you want to automate and we'll help you set it up.

Get access  Browse all templates →