Odoo Help


how to change the type of a field in a model(a table) of the official module (hr) OpenERP

duan yuanping
on 7/25/13, 10:30 PM 1,387 views

I wanna use the official hr module, But I wanna use my own fields. So I need to change the type of many fields.

eg. In the hr.employee, I wanna change the field:address_home_id from type "many2one" to "char". How can I do it ?

I know two ways:

First: settings->custom->model->edit.. It seems that I change it correctly, But it is not changed in the view.

Second: go to the source of the module;change the code:

'address_home_id': fields.many2one('res.partner.address', 'Home Address'),


'address_home_id': fields.char('Home Address',size=32),

But when I create a new record, failed!

Can somebody tell me how to get it right?

Thank you in advance!


Hiral Patel (hip)

--Hiral Patel (hip)--
| 2 1 5
--Hiral Patel (hip)--

Hiral Patel (hip)
On 7/26/13, 3:47 AM


In relational field you have to create new database. In other case like char -> integer, integer -> char you can restart the server and get newly assigned datatype.

Thank you.

Thanks, what do you mean by creating a new database?

duan yuanping
on 7/26/13, 5:55 AM

In login(Home) page you can view 'manage databases' link. From that you can create new database.

Hiral Patel (hip)
on 7/26/13, 8:00 AM

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/25/13, 10:30 PM
Seen: 1387 times
Last updated: 3/16/15, 8:10 AM