Purpose ======= This commit brings a new community application to allow recycling automatically/manually the existing records. Here is some business examples that could be achieved using this tool: - Delete all livechat sessions without any messages for more than 1 week. - Archive all tasks on a given support project that are in Cancelled stage for more than 2 years. - Delete all applications that we refused 6 months ago. The tools allows to delete/unlink spotted records based on a widget domain (stage.name='Cancelled') and temporal fields (last_stage_update is passed since 2 years). Either the recycling is done automatically by a cron, or a notification report is sent to specified users letting them know how many untreated records have been found. This application is regrouped with the enterprise features of data cleaning and data merging under the same application set. closes odoo/odoo#89312 Taskid: 2827911 Related: odoo/enterprise#26568 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
16 lines
718 B
XML
16 lines
718 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="ir_cron_clean_records" model="ir.cron">
|
|
<field name="name">Data Recycle: Clean Records</field>
|
|
<field name="model_id" ref="model_data_recycle_model"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model._cron_recycle_records()</field>
|
|
<field name="active" eval="True"/>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">days</field>
|
|
<field name="numbercall">-1</field>
|
|
<field name="doall" eval="False"/>
|
|
<field name="nextcall" eval="(DateTime.now().replace(hour=3, minute=0) + timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')" />
|
|
</record>
|
|
</odoo>
|