openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #06985
Re: Advanced filters in odoo
One way you can achieve that :
Define a functional field as the subtraction of both two fields,
Define for your newly created field a search function, as functional field
that are not store true can not be searched, as of v7, I have not tested
that on v8, though I was aware that was a coming feature,
And viola, you will be able to look for your new fields values greater or
less than zero,
Best regards
On Oct 26, 2014 6:42 AM, "Mohamed M. Hagag" <mohamedhagag1981@xxxxxxxxx>
wrote:
> Dears,
>
>
> How can i add filter that compares 2 fields in the object for ex.
> [('credit_limit','<',credit)] on partners ?
>
>
> Now I'm making an advanced search and saving it then using the automated
> actions I edit the search.
>
>
> But if I wrote it like the previous example I always get "credit not
> defined" error.
>
>
> I always get the second field not defined error .
>
>
> Any idea how this should be done in the code?
>
>
> And why the second field is always not defined, how should i code it ??!
>
>
> Regards,
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help : https://help.launchpad.net/ListHelp
>
>
References