This question has been flagged
2 Replies
6229 Views

I created a table with 2 fields.

After that, I edited 1 field's name and when I update the module, the system created a new field and the old field is not deleted.

How can I delete that field?

Avatar
Discard
Best Answer

Hi,

If you upgrade the module, the old field will remain as it is and the new field will get created. If you want to remove the old field, uninstall the module and install it again.

Avatar
Discard

It didn't work for me. I still see my field that I want to delete in my field list of my model. I manually deleted this field from DB and I still can see it through the Odoo UI.

I tried to delete it from the UI, but I'm getting the following error:

"This column contains module data and cannot be removed!". But DB doesn't show any data in that column, it's empty.

Best Answer

There are some ways to resolve this issue:

1.Make sure that the previous view deleted in the the view table or not.If not delete the previous view and update the module.

2. Un-install that module and re-install again

3. You can change the label for the field in view level , if you want .For example :

   <label for "field_name"  position="replace">

  <label string="New String" for="field_name" />

  </label>


All the best

Avatar
Discard