Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1087 Vistas

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

Avatar
Descartar
Autor Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jun 25
1393
1
jun 25
178
2
mar 25
1583
0
ene 25
1055
1
jun 25
538