跳至内容
菜单
此问题已终结
2 回复
3373 查看

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

形象
丢弃
编写者

Thank you,

it work

最佳答案

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

形象
丢弃

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>

编写者

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

最佳答案

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

形象
丢弃
编写者

Thank you ,

it work

编写者

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.