コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1437 ビュー

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

アバター
破棄
著作者 最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
2
6月 25
1828
1
6月 25
732
2
3月 25
2142
0
1月 25
1431
4
8月 25
1210