42
42
# TODO offer rows.res_partner(1,2).name to get a list of names?
44
44
# Using a domain to constrain the results TODO better example
45
for p in rows.res_partner(1,2).where(c.name < 5):
45
for p in rows.res_partner.where(c.name.like('ASUS')):
48
for p in rows.res_partner(1,2).where(c.name < 5).where(c.num > 3).debug():
48
for p in rows.res_partner(17,18,19,20).where(c.name.like('a')).where(c.credit_limit > 100).debug():
51
51
# Unfortunately, grouping is needed.
52
for p in rows.res_partner(1,2).where((c.name < 5) & (c.num > 3)).debug():
55
# Simplified (overloaded) notation.
56
for p in rows.res_partner((c.name < 5) & (c.num > 3))(1,2).debug():
52
for p in rows.res_partner((c.name.like('a')) & (c.credit_limit > 100)):
59
55
# In fact, since the return type is the same as the original one:
60
for p in rows.res_partner((c.name < 5) & (c.num > 3))(1,2):
56
for p in rows.res_partner(c.name.like('a'))(1,2):
64
for p in rows.res_partner(c.name < 5)(c.num > 3):
60
for p in rows.res_partner(c.name.like('a'))(c.credit_limit > 100):
67
63
cx = (c.name < 4) & (c.attendees > 5) # & child_of(c.object.company_id, c.user.company_id)
66
#(c.name < 4)(c.attendees > 5)