Skip to Content
Menu
This question has been flagged
1 Reply
4223 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?

Avatar
Discard
Author

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 - 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).

Author

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.

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

Best Answer

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.

 

Avatar
Discard
Related Posts Replies Views Activity
2
Mar 15
7142
0
Jul 22
1414
1
Jan 24
4542
0
May 22
1511
2
Mar 22
4795