Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
10370 Vizualizări

The following domain addition throwing a error while using department_id field in search view.

And tried the openerp doc doc.openerp.com/v6.0/developer/2_6_views_events/views/search_view.html#fields

How can i solve this?

<field name="type">search</field>            
<field name="arch" type="xml">
   <search string="Home">
          <field name="company_id"/>
          <field name="department_id" domain="[('company_id','=',company_id)]"/>
   </search>
</field>

Thanks in advance

Imagine profil
Abandonează
Cel mai bun răspuns

In the search view is not possibile insert a domain relative to another field. You can only use the value of the some field to set parameters about it self or some particular parameters like uid, for example. If you read the example at the link you post, you can see

<field name="location_id" string="Location"
       filter_domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>

where the filter_domain are applied to self value (location_id value)

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iun. 24
4208
5
iun. 23
35517
1
dec. 23
19336
1
iul. 15
6147
2
mar. 15
6284