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
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if &#40;tarif <20>= -20&#41; and 
&#40;tarif <10>= -10&#41; and &#40;tarif <10> 10&#41; and &#40;tarif <30>= 
30&#41; and &#40;tarif <60>= 60&#41;&nbsp; &#58;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;res = 0
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;result&#91;id&#93; = res
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;else &#58;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;res =0
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;result&#91;id&#93; = res
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;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

Reply via email to