ok, know it now:

in the addons/<<module>>/report/ folder one has to change the concerned xxx.py 
file. You have to add 
from tools import amount_to_text

Now the function must be initialized, so there is one more line to be added. 
For the sale-order-report (/addons/sale/report/order.py), it looks like this:

class order&#40;report_sxw.rml_parse&#41;&#58;
&nbsp; &nbsp;def __init__&#40;self, cr, uid, name, context&#41;&#58;
&nbsp; &nbsp;&nbsp; &nbsp;super&#40;order, self&#41;.__init__&#40;cr, uid, 
name, context&#41;
&nbsp; &nbsp;&nbsp; &nbsp;self.localcontext.update&#40;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;'time'&#58; time,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;'amount_to_text_fr'&#58; 
amount_to_text.amount_to_text_fr,
&nbsp; &nbsp;&nbsp; &nbsp;&#125;&#41;

In the report-rml-file this function can now be used typing something like:
&#91;&#91; amount_to_text_fr&#40;'2', "EUR'&#41; &#93;&#93;





_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to