Sale and purchase: form relate to shipments does not work
For any sale or purchase, I can't open related shipments using the relate button.
Here's the traceback on server side for a purchase:
Traceback (most recent call last):
File "trytond/trytond/protocols/dispatcher.py", line 129, in dispatch
res = getattr(obj, method)(cursor, user, *args, **kargs)
File "trytond/trytond/model/modelsql.py", line 1158, in search
domain, context=context)
File "trytond/trytond/model/modelsql.py", line 1313, in search_domain
tables_args, context=context)
File "trytond/trytond/model/modelsql.py", line 1343, in __search_domain_oper
tuple_args, tables, tables_args, context=context)
File "trytond/trytond/model/modelsql.py", line 1726, in __search_domain_calc
for x in arg2]
File "trytond/trytond/backend/fields.py", line 40, in sql_format
return int(value or 0)
TypeError: int() argument must be a string or a number, not 'dict'
> trytond/trytond/backend/fields.py(40)sql_format()
-> return int(value or 0)
value is a dictionary :
{'code': '3', 'create_date': datetime.datetime(2010, 5, 20, 16, 16, 13, 251841), 'reference': False, 'planned_date': False, 'state': 'done', 'supplier': 2, 'contact_address': 1, 'effective_date': datetime.date(2010, 5, 20), 'id': 3}
The problem is the domain set in purchase.act_shipment_form:
[("id", "in", Eval('shipments'))]