Odoo Help


Fixing a custom field and database implications?

Chris Collins
on 9/11/15, 11:05 AM 1,109 views

I added a field x_part_number through the web interface.  This is before I realized it needed to be added by a custom module.  However we have over 6000 products and the x_part_number field is populated in every product.  

I want to create a custom module addon to add the part x_part_number instead and remove it from the way I added it in the web interface.   

Can I do this without it affecting the database?  If it will affect the database how can I fix it?

Hello, i took over the IT work chris, my name is Mike Ryder and i'm the marketing/IT/designer here at 911 Fleet & Fire Equipment. We are having a big issue where we are not able to login to our odoo software. When we visit the link where it is hosted it will not bring up anything, only a message saying the connection is refused. I need help getting this back up and running asap because we have salesmen needing access. Please contact me as soon as you're able to at (513) 200-3004. Thank you.

Chris Collins
on 5/17/16, 11:03 AM

@Chris - this is not the place to ask for urgent support. First, you are hijacking an unrelated thread, second you are asking in a place where nobody is guaranteed to read your post. You need to contact the hosting provider (either Odoo or who set it up for you).

Ray Carnes
on 5/17/16, 4:41 PM

Sorry, i thought you worked for Odoo. Also, i dont know anything about Odoo so i thought this was a messenger type system and not just a forum thread that could be "hijacked". And i've tried contacting Odoo but no one has contacted me back. But never mind, i'll keep searching on my own for who to contact since apparently no one at Odoo cares about customer support once someone has bought their product.

Chris Collins
on 5/19/16, 9:29 AM

Call the San Francisco office - details at https://www.odoo.com/page/contactus

Ray Carnes
on 5/20/16, 11:45 AM

Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 9/11/15, 5:13 PM

Now that you've created it, it's probably easier to leave it alone.

It doesn't need to be in a custom module.  Fields are prefixed with x_ specifically so they will not be removed during upgrades.  It is certainly more convenient for it to be in a custom module, but technically it isn't necessary.

To remove it you need to reverse the SQL changes made to the database when it was created, which includes updating Odoo metadata tables.

This is what happens when you add a simple field to an Odoo model:

  1. A row is inserted in ir_model_fields

  2. The table in PostgreSQL is altered to have the new column added

Reverse these and the field is gone.

Warning: You will lose all the data in this field, so make sure you have a copy if you need it.


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: 9/11/15, 11:05 AM
Seen: 1109 times
Last updated: 5/19/16, 9:29 AM