Domain is not working in the search field.

Bug #891966 reported by Vivek poddar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web Client
Invalid
Undecided
Unassigned

Bug Description

I have to m2o fields in the search form :
1)main_id
2)sub_id
and when i apply domain like <field name="sub_id" domain="[('main_id','=',sub_id)]"/>, it does not works and shows every result on search , i think it is failing to take the value of the field sub_id !

Revision history for this message
Vivek poddar (vivekimsit) wrote :
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Vivek,

We have not implemented this feature in both client Because field in search view already working like domain.

If we create a field in search view, It fire a search query. So It will create a domain like domain="[('field','like','value']"
That's why If we put a another domain at field that doesn't make sense..:-)

You can use a search_default for this type of issue or you can pass a context, then it will works.
So this is not a bug and we can not consider this for implementation.

Currently I am closing this issue, If you provide us proper use case for it and It show us this is needed then you can reopen this.

Thanks for reporting!

Changed in openobject-client-web:
status: New → Invalid
Revision history for this message
Vivek poddar (vivekimsit) wrote : Re: [Bug 891966] Re: Domain is not working in the search field.

Thankx !

But I think that you didn't understood my question, its simple :
1)I have to m2o fields in the search view.
2)I want that when I select some record in the m2o then the list of records
shown in the adjacent m2o should depend on the value of first m2o field.
3)Currently it works fine for some constant value like :
[('my_id','=',some_constant)]
4)But it fails for my case.

My use case is that:
->I have many country and each country can have many states .
->When I select some country in one m2o then the number of states shown in
the second m2o should be restricted to show only the states belonging to
that country.
->This concept works fine for me in forms but not in search view..?

On Wed, Nov 30, 2011 at 4:33 PM, Amit Parik (OpenERP) <email address hidden>wrote:

> Hello Vivek,
>
> We have not implemented this feature in both client Because field in
> search view already working like domain.
>
> If we create a field in search view, It fire a search query. So It will
> create a domain like domain="[('field','like','value']"
> That's why If we put a another domain at field that doesn't make sense..:-)
>
> You can use a search_default for this type of issue or you can pass a
> context, then it will works.
> So this is not a bug and we can not consider this for implementation.
>
> Currently I am closing this issue, If you provide us proper use case for
> it and It show us this is needed then you can reopen this.
>
> Thanks for reporting!
>
>
> ** Changed in: openobject-client-web
> Status: New => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/891966
>
> Title:
> Domain is not working in the search field.
>
> Status in OpenERP Web Client:
> Invalid
>
> Bug description:
> I have to m2o fields in the search form :
> 1)main_id
> 2)sub_id
> and when i apply domain like <field name="sub_id"
> domain="[('main_id','=',sub_id)]"/>, it does not works and shows every
> result on search , i think it is failing to take the value of the field
> sub_id !
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-client-web/+bug/891966/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.