Hi I've been struggling to create the following domain
I want all the records of a model for which one or both of two fields have
> the same value
and where created on a list of given days, each day starts at 0:0:0 and
> ends at 23:59:59
For example in a person database containing the following model
class Person(ModelSQL):
# implicit create date
firstname = Char('Firstname')
lastname = Char('Lastname')
Here's the current domain that I have:
given that
dates = [date(2012, 9, 10, date(2012, 9, 2), date(2012,9,3) ]
name = 'Smith'
dom = [
['OR',
[('lastname', '=', name)],
[('firstname', '=', name)]
],
['OR',
[ [
(CD, '>=', dt(date(d.year, d.month, d.day), time(0,
0, 0))),
(CD, '<', dt(date(d.year, d.month, d.day), time(23,
59, 59))),
] for d in dates ]
]
]
Any help is really appreciated.
--
--
[email protected] mailing list