Odoo Help

0

on_change event don't work with date field

By
aymen
on 11/14/13, 11:57 AM 726 views

Hello,

I want to create an on change event when writing on a date field: when i put 01 it should write automatically the month and the year (01.11.2013). I did that with other type of field but it doesn't work with date field, it just put the value when i save the record.

Any one have an idea about that and can help me?

Thanks,

Could you please post your code and where are you trying to add this functionality?

GH Mediacloud, Grover Menacho
on 11/14/13, 12:14 PM

hello, here is my function: def onchange_date(...,date,...): return {'value':{'field_date':date}} what i can't understand is that when i write 01 and i make a print of the 'field_date' i have 01.11.2013 so 'field_date' contain the good result but it's not showed untill i save the record

aymen
on 11/16/13, 7:36 AM

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 platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 11/14/13, 11:57 AM
Seen: 726 times
Last updated: 3/16/15, 8:10 AM