Odoo Help


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.


How to auto fill datefield with today date?

Bonnet Denis
on 7/9/13, 11:57 AM 1,226 views

I want to update the opportunity date deadline field with the current date when the Opportunity is Win.

I overwritten the onchange_stage_id method but I don't know how I can update the field with the current date.

Thanks for help.


Grover Menacho

--Grover Menacho--
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 7/9/13, 12:07 PM

Add this to the header:

from datetime import date

Return this on your onchange:


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)


Asked: 7/9/13, 11:57 AM
Seen: 1226 times
Last updated: 3/16/15, 8:10 AM