First, , I would would like to thank previous and further help... :)
So, in my custom_view.xml, I have a act_window with :
name="Technical documents"
domain="[('res_id', '=',
'product_tmpl_id.id'),('res_model','=','product.template')]"
res_model="ir.attachment"
src_model="product.product"
view_type="form"
view_mode="tree,form"
id="act_product_2_template_attach"
I have already tested with 'product_tmpl_id' (instead of 'product_tmpl_id.id')
... no way...
In both cases, the logs, server side and client side, show :
------
Mon, 19 Nov 2007 09:56:21 ERROR:web-services:Exception in call: Traceback (most
recent call last):
File "/usr/lib/python2.5/site-packages/tinyerp-server/netsvc.py", line 206,
in _dispatch
r=m(*params)
File
"/usr/lib/python2.5/site-packages/tinyerp-server/service/web_services.py", line
366, in execute
res = service.execute(db, uid, object, method, *args)
File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/osv.py", line 111,
in execute
res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/osv.py", line 92,
in execute_cr
res = getattr(object,method)(cr, uid, *args, **kw)
File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/orm.py", line 1732,
in search
(qu1,qu2,tables) = self._where_calc(cr, user, args, context=context)
File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/orm.py", line 1680,
in _where_calc
qu2.append(table._columns[x[0]]._symbol_set[1](x[2]))
File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/fields.py", line
118, in <lambda>
_symbol_f = lambda x: int(x or 0)
ValueError: invalid literal for int() with base 10: 'product_tmpl_id.id'
---------
If I try without the '' (ie product_tmpl_id or product_tmpl_id.id), the client
log shows :
--------------
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/tinyerp-client/widget/view/form.py",
line 158, in _action
act['domain'] = self.screen.current_model.expr_eval(act['domain'],
check_load=False)
File
"/usr/lib/python2.5/site-packages/tinyerp-client/widget/model/record.py", line
233, in expr_eval
val = tools.expr_eval(dom, d)
File "/usr/lib/python2.5/site-packages/tinyerp-client/tools/__init__.py",
line 37, in expr_eval
return eval(string, context)
File "<string>", line 1, in <module>
NameError: name 'product_tmpl_id' is not defined
----------
I'm in very deep water...
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users