콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3454 화면

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

.

.

.

아바타
취소

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

베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
1
7월 22
3810
0
4월 18
3322
0
2월 23
6213
2
1월 22
3046
1
9월 16
56