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

on_change event don't work with date field

By
aymen
on 11/14/13, 11:57 AM 672 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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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