I have a problem when i use domain to compare two integer fields ?
_name = 'y'
_name = 'x''y_id': fields.many2one('y', 'Y', domain="[('field1','>','field2')]"),
=> ValueError: invalid literal for int() with base 10: 'field2'
In domain filter you have to give the value in right side of the operator. In domain we have to follow the syntax like : [('field_of_model','operator','any_value_according_to_field_and_operator')]
In your domain 'field2' is text and system is going to convert it into "int" thats why system is giving an error message "like invalid literal for int() with base 10:"
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
|Asked: 5/26/15, 8:00 PM|
|Seen: 1514 times|
|Last updated: 5/27/15, 5:20 AM|