Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1457 Zobrazení

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

Avatar
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
čvn 25
1863
1
čvn 25
759
2
bře 25
2189
0
led 25
1452
4
srp 25
1247