For example, there are two models:
sale.order and purchase.order
Where we can select a product from the filtered list of products using one of your favorite filter by pressing on "Search more..."
How to set one filter for the first model, and another for the second model, if they standard for both?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
1
Odpowiedz
6386
Widoki
Hi Gleb,
You can do it by passing the default search filter in the context of the o2m field in XML file by inheriting the view of related object.
Ex:
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="context">{'search_default_ur_filter_name': 1}</attribute> # Here you need to add the original context from the base view as well
</attributes>
Thanks for the answer
I understand how to do it through the widget)
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
lis 23
|
3061 | ||
|
7
kwi 21
|
20392 | ||
filter with related model field
Rozwiązane
|
|
1
paź 20
|
4807 | |
change search filter
Rozwiązane
|
|
2
lis 16
|
4175 | |
Search with functional fields
Rozwiązane
|
|
4
mar 15
|
21110 |