Let me first state I am new to Python and still learning some of the data types and how to construct them.
I am trying to build a list of criteria to pass to the XML RPC. This page (https://www.odoo.com/documentation/8.0/reference/orm.html#reference-orm-domains) states a list of criteria can be passed using triple tuples. So... I 'm trying to construct a tuple of tuples I can pass to the XML RPC.
Can someone help me understand what I'm doing wrong?
EXAMPLE OF TUPLE BEING CREATED:
for k,v in search_conditions.items():
name = k
val = v
conditions = conditions + (name,'=',val)
EXAMPLE OF PASSING conditions to the XML RPC
sock.execute(dbname, uid, pwd, model, 'search', conditions)
ERROR I GET:
if not any(item[0] == \'active\' for item in domain):\n File "/opt/odoo/odoo/openerp/models.py", line 4438, in <genexpr>\n if not any(item[0] == \'active\' for item in domain):\nTypeError: \'int\' object has no attribute \'__getitem__\'\n'>