Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
1617 Prikazi

How do i archive a model in Odoo  marking records in a model as without permanently deleting them? 

Avatar
Opusti
Avtor Best Answer

Include the active field in the model definition if it's not already present.

active = fields.Boolean(string="Active", default=True)

Add a filter to show archived records in the search view if required.

<record id="view_my_model_search" model="ir.ui.view"> <field name="name">my.model.search</field> <field name="model">my.model</field> <field name="arch" type="xml"> <search> <filter string="Archived" domain="[('active', '=', False)]"/> </search> </field> </record>

Regards, NIkhil T Amzsys


Accurates

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
avg. 25
2641
2
jun. 25
2144
1
jun. 25
907
0
jan. 25
1575
3
sep. 25
151