Odoo Help

Welcome!

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.

0

lessthan and greated than operator for domain in xml

By
emonrockz
on 10/15/14, 7:25 AM 1,751 views

Hi,

I am added a domain for a many2one field like shown below:

<field name="my_field" domain="[('field1_date','<',date1)]" />

where my_filed is a many2one field with reference class class_ref, field1_date is a datetime field in reference class (class_ref) and date1 is date field in current class. I am getting the following error:

"Unescaped '<' not allowed in attributes values"

Please help me with a solution.

 

Thanks in advance.

3
Piyush Suva
On 10/15/14, 7:33 AM

use domain =[('field1_date','&lt;',date1)]

It will work

for > use &gt;

    < use &lt;

 <= use &lt;=

>= use &gt;=

0
emonrockz
On 10/15/14, 7:56 AM

Thank you Piyush Suva. It worked.

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

1 follower(s)

Stats

Asked: 10/15/14, 7:25 AM
Seen: 1751 times
Last updated: 3/16/15, 8:10 AM