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

Fixing a custom field and database implications?

By
Chris Collins
on 9/11/15, 11:05 AM 563 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).

Bista Solutions US, 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

Bista Solutions US, Ray Carnes
on 5/20/16, 11:45 AM
0

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

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. 

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.

 

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