I want to hide rows in a list view where for example the same name appears in multiple rows.
So basically if the count of the same name is higher than 1.
Is there an easy way to do this with a domain or something similar?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I want to hide rows in a list view where for example the same name appears in multiple rows.
So basically if the count of the same name is higher than 1.
Is there an easy way to do this with a domain or something similar?
Hi
You may do like this, Create a function for the same with filtering your records and call this function though a server action and make this server action as action for your menu.
def your_function(self):
your_filtered_records=[]
return {
'name': 'Name',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'your_model',
'view_id': False,
'type': 'ir.actions.act_window',
'domain': [('id', 'in', your_filtered_records)]
}
<record id="your_menu_action" model="ir.actions.server">
<field name="name">Name</field>
<field name="condition">True</field>
<field name="model_id" ref="module.model_your_model"/>
<field name="code">action = model.your_function()</field>
<field name="state">code</field>
<field name="type">ir.actions.server</field>
</record>
<menuitem id="your_menu" name="Menu" parent="menu_parent"
action="your_menu_action" sequence="1"/>
Hope this will help you
Thanks
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
1
Jul 19
|
6441 | ||
|
0
Feb 25
|
18 | ||
|
0
Apr 22
|
6062 | ||
|
1
Jan 20
|
7856 | ||
Binding port number with domain name or ip?
Diselesaikan
|
|
1
Nov 19
|
3846 |