Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

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

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
databasefielddeleteodoo10
1 Rispondi
19876 Visualizzazioni
Avatar
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
Avatar
Abbandona
Avatar
Ibrahim Boudmir
Risposta migliore

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

0
Avatar
Abbandona
Ibrahim Boudmir

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

Art
Autore

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
Autore

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.

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
How to create my own view using "base_external_dbsource"?
database odoo10
Avatar
0
nov 18
3085
How can we display data from MongoDB in Odoo?
database odoo10
Avatar
Avatar
Avatar
2
nov 18
9089
Is there something like database seed in odoo10? Risolto
database odoo10
Avatar
Avatar
1
set 17
4332
how do you delete a database?
database delete
Avatar
Avatar
1
mar 15
13814
Deleting product and product variation database - creating a clean workspace without losing visual modifications
database delete wipe
Avatar
Avatar
1
mar 24
3163
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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