Odoo Help


How to auto fill datefield with today date?

Bonnet Denis
on 7/9/13, 11:57 AM 2,136 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--

Odoo Developer

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

Add this to the header:

from datetime import date

Return this on your onchange:


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.


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

1 follower(s)


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