forked from Mapan/odoo17e
88 lines
4.6 KiB
XML
88 lines
4.6 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
<data>
|
|
<record model="ir.ui.view" id="view_data_cleaning_model_list">
|
|
<field name="name">Field Cleaning Model List</field>
|
|
<field name="model">data_cleaning.model</field>
|
|
<field name="arch" type="xml">
|
|
<tree decoration-muted="not active">
|
|
<field name="name" />
|
|
<field name="res_model_id" />
|
|
<field name="cleaning_mode" groups="base.group_no_one" />
|
|
<field name="active" widget="boolean_toggle" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="view_data_merge_model_form">
|
|
<field name="name">Field Cleaning Model Form</field>
|
|
<field name="model">data_cleaning.model</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="action_clean_records" type="object" string="Clean" class="oe_highlight" />
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button class="oe_stat_button" name="open_records"
|
|
type="object" icon="fa-bars">
|
|
<field name="records_to_clean_count" string="Records" widget="statinfo"/>
|
|
</button>
|
|
</div>
|
|
<div class="oe_title">
|
|
<h1>
|
|
<field name="name" />
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="res_model_id" options="{'no_create': True, 'no_open': True}" />
|
|
<field name="res_model_name" invisible="1" />
|
|
<field name="active" widget="boolean_toggle" />
|
|
</group>
|
|
<group>
|
|
<field name="cleaning_mode" widget="radio" options="{'horizontal': true}" />
|
|
|
|
<!-- Manual cleaning -->
|
|
<label for="notify_user_ids" invisible="cleaning_mode == 'automatic'" />
|
|
<div invisible="cleaning_mode == 'automatic'">
|
|
<field name="notify_user_ids" widget="many2many_tags" options="{'no_create': True, 'no_edit': True}" domain="[('share', '=', False)]" nolabel="1"/>
|
|
<div class="d-flex w-25" invisible="not notify_user_ids">
|
|
<span class="me-1">Every</span>
|
|
<field name="notify_frequency" required="notify_user_ids" />
|
|
<field name="notify_frequency_period" required="notify_user_ids" />
|
|
</div>
|
|
</div>
|
|
</group>
|
|
</group>
|
|
<group invisible="res_model_id">
|
|
<group>
|
|
<div class="alert alert-info" role="alert" colspan="2">
|
|
Select a model to configure cleaning actions
|
|
</div>
|
|
</group>
|
|
</group>
|
|
<group invisible="not res_model_id">
|
|
<field name="rule_ids" context="{'default_res_model_id': res_model_id}">
|
|
<tree string="Cleaning Actions">
|
|
<field name="res_model_id" column_invisible="True" />
|
|
<field name="sequence" widget="handle" />
|
|
<field name="field_id" options="{'no_create': True, 'no_open': True}" />
|
|
<field name="action_display" string="Action" />
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="action_data_cleaning_config">
|
|
<field name="name">Field Cleaning Rules</field>
|
|
<field name="res_model">data_cleaning.model</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">['|', ('active', '=', False), ('active', '=', True)]</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|