OK, here is what I did, not elegant, but when I will dig more into the code, I
will replace it:
(if the type of product.product_tmpl_id is an int, I don't browse it.)
for product in self.browse(cr, uid, ids, context):
template_id = 0
if type(1) == type(product.product_tmpl_id):
template_id = product.product_tmpl_id
else:
template_id = product.product_tmpl_id.id
template = self.pool.get('product.template').browse(cr, uid,
template_id)
synchro.createOrUpdateProduct(product, template.id)
-------------------- m2f --------------------
--
http://www.openerp.com/forum/viewtopic.php?p=24309#24309
-------------------- m2f --------------------
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users