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

What is the perfect way to show only some rows in a one2many filed

Avatar
Opusti
Best Answer

HI Jacky,


you can use domain to filter the one2many.
Like 

expense_ids = fields.One2many('hr.expense', 'sale_order_id', string='Expenses', domain=[('state', '=', 'done')], readonly=True, copy=False)

Refer this question, you get more ideas:
https://www.odoo.com/forum/help-1/question/how-to-write-this-domain-for-a-one2many-field-on-a-view-114226

regards, Nikhil
Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jan. 25
1926
2
sep. 22
9677
2
apr. 22
4719
0
jul. 21
7343
1
mar. 21
5073