Skip to Content
Menu
This question has been flagged
2 Replies
2941 Views

hi,

I want to know how to filter my contact view based on country  like employees views witch is based on department. 

I'm using odoo entreprise 13 hosted in local

Avatar
Discard
Author

Thank you,

it work

Best Answer

Hi,


you can do it by inherit the search view of Contact  View and add searchpanel for country_id 

(unfortunately, I can't able to POST code here so I added in Comment Section of this answer)

Quick Search By Country


Image of Quick Search


Thanks & Regards,

Sunny Sheth

Avatar
Discard

Code Sample for Custom Module

********************************

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

<field name="name">res.partner.search.country.inherit</field>

<field name="model">res.partner</field>

<field name="inherit_id" ref="base.view_res_partner_filter"/>

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

<xpath expr="//group" position="after">

<field name="country_id" icon="fa-retweet" enable_counters="1"/>

</xpath>

</field>

</record>

Author

Hi,

"I try to display all record in search panel.

because when do your solution, it work but I have this mistake.

For performance reasons, only 200 values were fetched. Some values might be missing. The values have not been hierarchized."

how can I display all record of my panel search.

in ODOO V14, there Limit Attribute available but unfortunately in V13 not available for searchpanel records to get at a time instead of fixed 200 records.

I also Checked with 630 Records in Searchpanel and all are display in V14 but not display in V13.

Thanks

Best Answer

Hi,

- Enable developer mode

- Go to your contacts (kanban or tree view) and click on the "bug" symbol on the right top.

- Select "Edit ControlPanelView"

- Paste the following string:

<searchpanel>
    <field name="country_id" icon="fa-globe" />
</searchpanel>

between "</group>" and "</search>" on the bottom.

- Click on "Save"

- Refresh your browser

Avatar
Discard
Author

Thank you ,

it work

Author

Hi,

"I try to display all record in search panel.

because when do your solution, it work but I have this mistake.

For performance reasons, only 200 values were fetched. Some values might be missing. The values have not been hierarchized."

how can I display all record of my panel search.