Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2996 Zobrazení

Hi all, I just started developing with odoo and I have a few questions: 

Is it possible to make a group of filters like it is implemented with date?

If it is possible to make a group, then I have several documents with the same number and can I make a filter so that I have all the available numbers in the group so that I can make a filter by them?

For example:

Document number Title

111                            Case of...

123                           something else

111                            an appendix to the case

.

.

.

Avatar
Zrušit

My first answer is yes, it's possible but it's not very clear what you wanna do or solve

Nejlepší odpověď

Yes, it is possible to create a group of filters in Odoo. These groups of filters are referred to as "filter groups" in Odoo's user interface. They are commonly used to organize filters and make it easier for users to find relevant filters for specific scenarios.

To create a filter group, you can follow these steps:

Go to the list view of the model you want to add the filter group to (e.g., Sales Orders, Purchase Orders, etc.).
Click on the "Filters" dropdown in the top right corner of the list view.
Click on the "Manage Filters" option.
In the new window that appears, you'll find a button to "Create" a new filter group. Give it a name and click "Save."
 
Filter by Document Numbers:
If you have several documents with the same number and you want to create a filter that shows all available numbers in the group- you can use the domain like [('field_name', '=', 'your_document_number')]
or you can try this method

<record id="view_my_custom_model_search" model="ir.ui.view">

<field name="name">my.custom.model.search</field>

<field name="model">my_module.my_custom_model</field>

    <field name="arch" type="xml">

        <search>

            <!-- Add the custom search filter for document numbers -->

            <filter string="All Document Numbers" domain="[]" help="Filter by Document Numbers" context="{'group_by': 'name'}"/>

        </search>

    </field>

</record>



Hope it helps

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 22
3314
0
dub 18
2963
0
úno 23
5788
2
led 22
2746
1
zář 16
56