Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Domain Filter in Search View

on 3/29/13, 8:49 AM 2,926 views

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)]"/>

Thanks in advance


Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 3/29/13, 9:47 AM



<field name="department_id" domain="[('company_id','=',context.get('company_id', False)]"/>


While using the suggested condition the following error popup ValueError: Error during evaluation of this domain: "[('company_id','=',company_id.id)]", message: "name 'company_id' is not defined"

on 3/30/13, 8:13 AM

answer update

Cyril Gaspard (GEM)
on 4/2/13, 5:43 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 3/29/13, 8:49 AM
Seen: 2926 times
Last updated: 3/16/15, 8:10 AM