Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1301 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มิ.ย. 25
1633
1
มิ.ย. 25
452
2
มี.ค. 25
1883
0
ม.ค. 25
1280
0
ก.ค. 25
146