Dears,
Again Plz let me know how to make this filter work, adding filter on
partners search form:
<field name="credit_limit"/>
<field name="credit"/>
<filter name="credit limit"
domain="[('credit','>',credit_limit)]"/>
Applying this filter gives below error:
|Uncaught Error: Failed to evaluate search criterions: ||
||{"code":400,"message":"Evaluation
Error","data":{"type":"local_exception","debug":"Local evaluation
failure\nNameError: name 'credit_limit' is not
defined\n\n{\"domains\":[[],\"[('customer','=',1)]\",\"[('credit','=',credit_limit)]\"],\"contexts\":[{\"lang\":\"en_US\",\"tz\":\"Africa/Cairo\",\"uid\":1,\"search_default_customer\":1}],\"group_by_seq\":[]}"}}|
I googled many times to find a solution without finding anyone .
the simple form [('credit_limit','<',credit)] always returns the error
"can not convert string to float" where string is credit and float is
credit_limit.
is there any way to say [('credit_limit','<',valueof(credit))] or
[('field1','=',valueof(field2))] ??
Regards,
On 10/26/2014 01:11 PM, Mohamed M. Hagag 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