Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

How to delete field from Odoo after deleting it from the models.py?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
databasefielddeleteodoo10
1 Răspunde
19878 Vizualizări
Imagine profil
Art

I have already tried to implement solutions I found in this forum regarding my issue, but it didn't work. So...

I created a field in my model, but then I decided that I don't need it anymore, so I removed it from the models.py and views.xml. Restarted the server, my field is not on the view/form anymore, but if I go to settings/technical/database structures/fields and search for that field that I deleted earlier it shows me in the list and that it belongs to my model.

I went to a DB and this field is there too. So I dropped that field manually from the table, but I still can see it in Odoo if I search it in settings.  

I uninstalled my module and installed it back, but I still can find it in Odoo in settings.

I tried to delete it through Odoo UI in settings, but I couldn't do it:

This column contains module data and cannot be removed!

I've no idea what data it contains.

I also updated everything through the command line: 

./odoo-bin -c /path-to-my-config-file/file_name.cfg -u all -d db_name

But that field is still in Odoo.

Maybe it's still in the database... Any thoughts?

0
Imagine profil
Abandonează
Imagine profil
Ibrahim Boudmir
Cel mai bun răspuns

did you try this :  https://www.odoo.com/fr_FR/forum/aide-1/question/delete-fields-from-database-without-uninstall-89352

0
Imagine profil
Abandonează
Ibrahim Boudmir

I suggest you update the module 'base' before you try Benjamin's solution.

Art
Autor

I have updated 'base' module and it didn't help me, I also updated all modules and it didn't help me. Didn't try Benjamin's solution yet.

Art
Autor

So here is how it works for me:

After restarting Odoo server those fields that I deleted from the model and view didn't fell out. I checked my db and they were still there. Then I uninstalled my module. I went to Accounting module where I was customizing "res.partner" form and I didn't see those fields that I deleted earlier, which is what I expected, but I was still able to see other custom fields that I didn't delete from the model and view even after I uninstalled the whole module. So then I updated the Accounting module and only after that those other custom fields that I saw earlier where gone (actually later I just refreshed a browser and fields were gone).

However, at this point I went and checked my db. Those custom fields that I didn't delete from the model/view fall out from the db, but those fields that I deleted from the model/view were still there. So if I understand everything right then if I want to delete my custom fields from the db I need to:

1) uninstall my module;

2) refresh browser;

3) delete unnecessary custom fields from the model and view;

4) install my module back without those unnecessary fields.

So when I go to settings/database structure/fields and search for my custom fields Odoo doesn't show them to me anymore, which is what I expected.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
How to create my own view using "base_external_dbsource"?
database odoo10
Imagine profil
0
nov. 18
3085
How can we display data from MongoDB in Odoo?
database odoo10
Imagine profil
Imagine profil
Imagine profil
2
nov. 18
9089
Is there something like database seed in odoo10? Rezolvat
database odoo10
Imagine profil
Imagine profil
1
sept. 17
4332
how do you delete a database?
database delete
Imagine profil
Imagine profil
1
mar. 15
13814
Deleting product and product variation database - creating a clean workspace without losing visual modifications
database delete wipe
Imagine profil
Imagine profil
1
mar. 24
3163
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now