Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

module num2words(module hr_holidays)

By
B.hind
on 9/8/16, 5:52 AM 179 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)

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/8/16, 5:52 AM
Seen: 179 times
Last updated: 9/8/16, 3:49 PM