I've tried to recreate the function by using your advice but unfortunately still not working, I've got the same error :(
With the function below it works only if I display the fields.function in the form BUT if I try to display it in the tree, I've got the same error ! def _compute_price_mark(self, cr, uid, ids, field_name, arg, context={}): result = {} for id in ids : freelance_pricecombi = self.browse(cr, uid, id, context=context) res = 0 tarif = 0 if freelance_pricecombi : tarif = (freelance_pricecombi.price * 100 / freelance_pricecombi.name['target_rate']) - 100 if (tarif <20>= -20) and (tarif <10>= -10) and (tarif <10> 10) and (tarif <30>= 30) and (tarif <60>= 60) : res = 0 result[id] = res else : res =0 result[id] = res return result Really don't get it :( Any Ideas ? Thanks for your help -------------------- m2f -------------------- -- http://www.openobject.com/forum/viewtopic.php?p=60352#60352 -------------------- m2f -------------------- _______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman2/listinfo/tinyerp-users