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

convert date field to dateime with data in openerp 7.0

By
Maniganda
on 9/25/14, 8:42 AM 1,420 views

I have created the datefield and working with it, now my requirement changed now i need to change the date field to datetime fields without loosing the previous data. how to achieve this scenario.
 

0

Temur

--Temur--
2894
| 6 5 7
Tbilisi, Georgia
--Temur--
Programmer
Temur
On 9/25/14, 9:39 AM

Hello,

You will not loose any data if you do not uninstall your module and just upgrade it, so you'll need simply change fields definition:

1) CHANGE:  'your_date_field': fields.date(... TO 'your_date_field': fields.datetime(....

2) Restart openerp

3) In your browser go to page: "Settings/Modules/Installed Modules", find  your module, open it and click on "Upgrade" button. As upgrade process ends, you're done. No any data will be lost and field type will be changed as you want.

Regards,

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)

Stats

Asked: 9/25/14, 8:42 AM
Seen: 1420 times
Last updated: 3/16/15, 8:10 AM