Skip to Content
Menu
This question has been flagged
3603 Views

hi,

this is my code :

myclass.py

from num2words import num2words

number_text=fields.Char(string='Nombre de jour')


def calculatenumber(number_of_days_temp):

number_text = num2words(number_of_days_temp, lang='fr')

return {'value': {'number_text': number_text}}

.xml

<xpath expr="//field[@name='interim']" position="after">

<field name="number_of_days_temp" nolabel="1" on_change="calculatenumber(number_of_days_temp)"/>

</xpath>

<field name="number_of_days_temp" position="after">

<field name="number_text"/>

</field>

,i got this error i dont know how to solve it



TypeError: calculatenumber() takes exactly 1 argument (5 given)

Avatar
Discard
Related Posts Replies Views Activity
0
Sep 23
41
4
Mar 23
15284
2
Jul 22
2449
0
May 22
1135
1
Nov 21
17203