تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
47113 أدوات العرض

hi !

i wish to create a view where data is filtered on a datetime field which is null

so in domain statement, i enter :

Code: domain="[('mydatetime','ISNULL,'')]

but i have to enter the third parameter after 'ISNULL', ! openerp does not let me pass 2 values only. what can i do ? i also tried Code: domain="[('mydatetime','=,'NULL')]

but it produced an error in sql (generate "mydatetime='NULL' whic cause a type error in sql)

so, what is the right syntaxe for null in the domain clause ?

thank for help

الصورة الرمزية
إهمال
أفضل إجابة

In python there is no null value, use False instead.

domain= [('mydatetime','=',False)]
الصورة الرمزية
إهمال

I think that we can use also None, agree with me ?

الكاتب أفضل إجابة

thank ! it works !

ps : i don't find the "solve" button, where is it ?

الصورة الرمزية
إهمال

Please use the "post a comment" button for a comment :) you have created a new answer! If you want to mark a question as "solved" just press the "correct answer" icon so that it becomes green.