This question has been flagged

Hi guys im trying to show the amount_total in the receip of the point of sale. i've found two functions,  python and Odoo, but anyone is working right, im tryng with the following code.


<strong><td>Total in words:</td></strong>

<span t-esc="odoo.tools.amount_to_text(total, usd)"/>


of course this is a qweb view, and in python i have this:


def _number2words(self):

     return num2words(self.amount_total)


I need to convert numbers to words, and anything is going well, in the POS show this 


Uncaught TypeError: dict.amount_to_text is not a function http://172.17.0.2:8069/pos/web/?debug=assets#action=pos.ui:165 Rastreo de error: TypeError: dict.amount_to_text is not a function at Engine.eval (eval at _render (http://172.17.0.2:8069/web/static/lib/qweb/qweb2.js:464:33), <anonymous>:165:64) at Engine._render

and also i got some like:


Cannot read property 'tools' of undefined


but if i make some changes. Can you help me please.

Avatar
Discard