El 02/05/17 a les 07:59, Vincent Bastos ha escrit:
> Hi,
>
> I wanted to know what the best way to write a domain for a search call
> to test for records that have a date in a particular field.
>
> My idea is something like this:
>
> nodate = Date(0)
>
> invoices = Invoice.search([
> ('lease', '=',
self.id),
> ('state', '!=', 'paid'),
> ('mydate', '!=', nodate),
> ], order=[('invoice_date', 'ASC')])
Not sure to understand, but if you want to search for invoices where the
mydate field is empty you can search for None as values. The clause will be:
('mydate', '=', None)
Hope it helps.
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk