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

How to update a field's type?

By
Matias Garcia Isaia
on 7/17/13, 1:28 PM 1,048 views

I'm thinking advance in time. I'm developing a module, and there are some fields of a custom object whose type isn't really narrowed by the time. I'm using some kind of "loose" type (say, text types) for things that in the future may result to be selections or another type (the use experience will tell what's the best).

How do you manage such changes? How does OpenERP cope with making a change like this? Does any extra step need to be done for updating the database?

0

Grover Menacho

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

Systems Engineer + MBA

Grover Menacho
On 7/18/13, 1:51 AM

Don't do that. You have to set your fields type before using it. I'm going to explain you why.

When you change the type of a field OpenERP automatically s going to create a new column on the database and the other column is going to be called name_moved or something like this. Even if you change between float to char.

Maybe you can make a SQL query that move all the data from the old column to the new one, but you have to do it manually.

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: 7/17/13, 1:28 PM
Seen: 1048 times
Last updated: 3/16/15, 8:10 AM