Odoo Help

1

How duplicate field date readony with the current date?

By
Achref Mhadhbi
on 11/9/15, 9:11 AM 1,454 views

I have a field type datetime.

date=fields.Datetime('Request date',default=fields.Date.today, required=True,readonly=True,copy=True)

When I duplicate, the field date copy the date of created not the current date when I duplicate.

I want to duplicate the field with current date. Can I duplicate the date with the current date?


3
Sakli
On 11/10/15, 12:55 PM

hello,

You may try like this(copy=False):

date=fields.Datetime('Request date',default=fields.Date.today, required=True,readonly=True,copy=False)

Hope this will help you.

Hii Goood,very useful, thanks for your help

Achref Mhadhbi
on 11/10/15, 1:40 PM

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

1 follower(s)

Stats

Asked: 11/9/15, 9:11 AM
Seen: 1454 times
Last updated: 11/10/15, 1:39 PM