I have and act_window which will open by default my custom filter (group_by):
<record id="master_equipment_act_window" model="ir.actions.act_window">
<field name="name">Equipment</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">model.name</field>
<field name="view_mode">tree,form,kanban</field>
<field name="context">{'search_default_group_location':1}</field>
<field name="search_view_id" ref="my_search_view"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create"> Empty list. </p>
<p>Please create one.</p>
</field>
</record>
The search:
<filter name="group_location" string="Location" context="{'group_by':'location'}"/>
By default, odoo will group the result in tree view by location, but needs to click > the arrow button to open
and view the results. Is it possible to open by default the result without clicking the arrow button? Thanks.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
5
Antworten
18256
Ansichten
There is a module Web GroupBy Expand which provides a functionality to expand / collapse the group by tree view and is available in all the versions.
Follow this example:
On your search view you have this filter
<filter string="Active Bookings" name="active_bookings" domain="[('state','in',['confirmed', 'pending_payment'])]"/>
Then on your action:
<record id="absale_booking_action" model="ir.actions.act_window">
<field name="name">Booking</field>
<field name="res_model">absale.booking</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('location_id','=',active_park_id)]</field>
<field name="context">{"search_default_active_bookings":1}</field>
</record>
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
1
Juni 16
|
3007 | ||
|
0
März 23
|
1847 | ||
|
2
Juni 22
|
3951 | ||
|
1
März 15
|
7961 | ||
|
1
März 15
|
13578 |
what is the arrow button >?
@Antonio what little change you made to get work ?