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

Problem installing Inventory management module

Iscriviti

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

La domanda è stata contrassegnata
6 Risposte
6949 Visualizzazioni
Avatar
Gilles

Hi,

I'm trying to install inventory module on odoo 9 but there is an error when I clic on install:

Odoo Warning - Validation ErrorThe operation cannot be completed, probably due to the following: - deletion: you may be trying to delete a record while other records still reference it- creation/update: a mandatory field is not correctly set[object with reference: stock_picking - stock.picking]

Then I can just clic on Cancel install.

Here is part of postgres serveur log file:

2016-11-14 23:11:48 CET [31598-1] odoo@odoo2 ERROR: column "name" contains null values2016-11-14 23:11:48 CET [31598-2] odoo@odoo2 STATEMENT: ALTER TABLE "stock_location" ALTER COLUMN "name" SET NOT NULL2016-11-14 23:11:48 CET [31598-3] odoo@odoo2 ERROR: column "name" contains null values2016-11-14 23:11:48 CET [31598-4] odoo@odoo2 STATEMENT: ALTER TABLE "stock_location_route" ALTER COLUMN "name" SET NOT NULL2016-11-14 23:11:49 CET [31598-5] odoo@odoo2 ERROR: column "product_uom" contains null values2016-11-14 23:11:49 CET [31598-6] odoo@odoo2 STATEMENT: ALTER TABLE "stock_move" ALTER COLUMN "product_uom" SET NOT NULL2016-11-14 23:11:49 CET [31598-7] odoo@odoo2 ERROR: column "location_id" contains null values2016-11-14 23:11:49 CET [31598-8] odoo@odoo2 STATEMENT: ALTER TABLE "stock_move" ALTER COLUMN "location_id" SET NOT NULL2016-11-14 23:11:49 CET [31598-9] odoo@odoo2 ERROR: column "name" contains null values2016-11-14 23:11:49 CET [31598-10] odoo@odoo2 STATEMENT: ALTER TABLE "stock_move" ALTER COLUMN "name" SET NOT NULL2016-11-14 23:11:49 CET [31598-11] odoo@odoo2 ERROR: column "location_dest_id" contains null values2016-11-14 23:11:49 CET [31598-12] odoo@odoo2 STATEMENT: ALTER TABLE "stock_move" ALTER COLUMN "location_dest_id" SET NOT NULL2016-11-14 23:11:49 CET [31598-13] odoo@odoo2 ERROR: column "product_id" contains null values2016-11-14 23:11:49 CET [31598-14] odoo@odoo2 STATEMENT: ALTER TABLE "stock_move" ALTER COLUMN "product_id" SET NOT NULL2016-11-14 23:11:49 CET [31598-15] odoo@odoo2 ERROR: column "location_id" contains null values2016-11-14 23:11:49 CET [31598-16] odoo@odoo2 STATEMENT: ALTER TABLE "stock_pack_operation" ALTER COLUMN "location_id" SET NOT NULL2016-11-14 23:11:49 CET [31598-17] odoo@odoo2 ERROR: column "location_dest_id" contains null values2016-11-14 23:11:49 CET [31598-18] odoo@odoo2 STATEMENT: ALTER TABLE "stock_pack_operation" ALTER COLUMN "location_dest_id" SET NOT NULL2016-11-14 23:11:50 CET [31598-19] odoo@odoo2 ERROR: insert or update on table "stock_move" violates foreign key constraint "stock_move_picking_id_fkey"2016-11-14 23:11:50 CET [31598-20] odoo@odoo2 DETAIL: Key (picking_id)=(3) is not present in table "stock_picking". 2016-11-14 23:11:50 CET [31598-21] odoo@odoo2 STATEMENT: ALTER TABLE "stock_move" ADD FOREIGN KEY ("picking_id") REFERENCES "stock_picking" ON DELETE set null

Here is odoo log file for this:

2016-11-14 22:11:48,501 22714 INFO odoo2 openerp.modules.loading: loading 1 modules... 2016-11-14 22:11:48,511 22714 INFO odoo2 openerp.modules.loading: 1 modules loaded in 0.01s, 0 queries2016-11-14 22:11:48,574 22714 INFO odoo2 openerp.modules.loading: loading 46 modules... 2016-11-14 22:11:48,614 22714 INFO odoo2 openerp.modules.loading: 46 modules loaded in 0.04s, 0 queries2016-11-14 22:11:48,619 22714 ERROR odoo2 openerp.modules.graph: module sale_mrp: Unmet dependencies: mrp2016-11-14 22:11:48,619 22714 WARNING odoo2 openerp.modules.graph: Some modules were not loaded. 2016-11-14 22:11:48,620 22714 INFO odoo2 openerp.modules.loading: loading 51 modules... 2016-11-14 22:11:48,791 22714 INFO odoo2 openerp.modules.module: module stock: creating or updating database tables2016-11-14 22:11:48,860 22714 WARNING odoo2 openerp.models.schema: Table 'stock_location': unable to set a NOT NULL constraint on column 'name' ! If you want to have it, you should update the records and execute manually: ALTER TABLE stock_location ALTER COLUMN name SET NOT NULL2016-11-14 22:11:48,896 22714 WARNING odoo2 openerp.models.schema: Table 'stock_location_route': unable to set a NOT NULL constraint on column 'name' ! If you want to have it, you should update the records and execute manually: ALTER TABLE stock_location_route ALTER COLUMN name SET NOT NULL2016-11-14 22:11:49,024 22714 WARNING odoo2 openerp.models.schema: Table 'stock_move': unable to set a NOT NULL constraint on column 'product_uom' ! If you want to have it, you should update the records and execute manually: ALTER TABLE stock_move ALTER COLUMN product_uom SET NOT NULL2016-11-14 22:11:49,037 22714 WARNING odoo2 openerp.models.schema: Table 'stock_move': unable to set a NOT NULL constraint on column 'location_id' ! If you want to have it, you should update the records and execute manually: ALTER TABLE stock_move ALTER COLUMN location_id SET NOT NULL2016-11-14 22:11:49,074 22714 WARNING odoo2 openerp.models.schema: Table 'stock_move': unable to set a NOT NULL constraint on column 'name' ! If you want to have it, you should update the records and execute manually: ALTER TABLE stock_move ALTER COLUMN name SET NOT NULL2016-11-14 22:11:49,080 22714 WARNING odoo2 openerp.models.schema: Table 'stock_move': unable to set a NOT NULL constraint on column 'location_dest_id' ! If you want to have it, you should update the records and execute manually: ALTER TABLE stock_move ALTER COLUMN location_dest_id SET NOT NULL2016-11-14 22:11:49,085 22714 WARNING odoo2 openerp.models.schema: Table 'stock_move': unable to set a NOT NULL constraint on column 'product_id' ! If you want to have it, you should update the records and execute manually: ALTER TABLE stock_move ALTER COLUMN product_id SET NOT NULL2016-11-14 22:11:49,310 22714 WARNING odoo2 openerp.models.schema: Table 'stock_pack_operation': unable to set a NOT NULL constraint on column 'location_id' ! If you want to have it, you should update the records and execute manually: ALTER TABLE stock_pack_operation ALTER COLUMN location_id SET NOT NULL2016-11-14 22:11:49,322 22714 WARNING odoo2 openerp.models.schema: Table 'stock_pack_operation': unable to set a NOT NULL constraint on column 'location_dest_id' ! If you want to have it, you should update the records and execute manually: ALTER TABLE stock_pack_operation ALTER COLUMN location_dest_id SET NOT NULL2016-11-14 22:11:50,149 22714 INFO odoo2 openerp.sql_db: bad query: ALTER TABLE "stock_move" ADD FOREIGN KEY ("picking_id") REFERENCES "stock_picking" ON DELETE set null

2016-11-14 22:11:50,150 22714 ERROR odoo2 openerp.modules.registry: Failed to load registryTraceback (most recent call last): File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 386, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 338, in load_modules loaded_modules, update_module) File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 237, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 137, in load_module_graph init_module_models(cr, package.name, models) File "/usr/lib/python2.7/dist-packages/openerp/modules/module.py", line 307, in init_module_models obj._auto_end(cr, {'module': module_name}) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 2716, in _auto_end cr.execute('ALTER TABLE "%s" ADD FOREIGN KEY ("%s") REFERENCES "%s" ON DELETE %s' % (t, k, r, d)) File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 141, in wrapper return f(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 220, in execute res = self._obj.execute(query, params)IntegrityError: insert or update on table "stock_move" violates foreign key constraint "stock_move_picking_id_fkey"DETAIL: Key (picking_id)=(3) is not present in table "stock_picking". 2016-11-14 22:11:50,155 22714 INFO odoo2 openerp.modules.loading: loading 1 modules... 2016-11-14 22:11:50,167 22714 INFO odoo2 openerp.modules.loading: 1 modules loaded in 0.01s, 0 queries2016-11-14 22:11:50,194 22714 INFO odoo2 openerp.modules.loading: loading 46 modules... 2016-11-14 22:11:50,238 22714 INFO odoo2 openerp.modules.loading: 46 modules loaded in 0.04s, 0 queries2016-11-14 22:11:50,736 22714 INFO odoo2 openerp.modules.loading: Modules loaded.

I've already tried to duplicate database: same issue

I try to create new database and I can install inventory module on it but I need to install module on first database that contains datas.

What can I do ? Thanks for help.

0
Avatar
Abbandona
Ermin Trevisan

Hi, thanks for answering.

This is fresh install, we start from odoo 9, maybe some modules were installed incorrectly. I've checked differences between both databases and I can see that some tables are missing on database that contains datas.

We have executed manually all of (correct) ALTER TABLE indicated into the log file and now the persistent error stays:

2016-11-15 15:38:18 CET [31598-42] odoo@odoo2 ERROR: insert or update on table "stock_move" violates foreign key constraint "stock_move_location_dest_id_fkey"2016-11-15 15:38:18 CET [31598-43] odoo@odoo2 DETAIL: Key (location_dest_id)=(0) is not present in table "stock_location". 2016-11-15 15:38:18 CET [31598-44] odoo@odoo2 STATEMENT: ALTER TABLE "stock_move" ADD FOREIGN KEY ("location_dest_id") REFERENCES "stock_location" ON DELETE set null

Is there a way to reinstall odoo without loosing datas ? I'd like to avoid to reinstall everything and begin from scratch again ...

Thanks

Ermin Trevisan

Do make a backup before you install modules, especially if you are not sure about the quality and compatibility of such modules. You should definitely go for a clean install with loosing your data.

Avatar
ralfeus@gmail.com
Risposta migliore

I had same problem. In my case it stated:

2019-01-10 08:12:25,649 1528 ERROR odoo odoo.sql_db: bad query: b'ALTER TABLE "stock_picking" ADD FOREIGN KEY ("location_id") REFERENCES "stock_location"("id") ON DELETE set null'
ERROR: insert or update on table "stock_picking" violates foreign key constraint "stock_picking_location_id_fkey"
DETAIL:  Key (location_id)=(12) is not present in table "stock_location".

I noticed there was no table "stock_location" at all as well as any other table starting with "stock_". Only table I saw was "stock_picking". So I removed this table assuming it would be created during installation of the module. And that's exactly what's happened. The table "stock_picking" as well as other "stock_*" ones were created and Inventory module was installed successfully.

So I'd recommend to remove all "stock_*" tables from the database and try to install Inventory module again

0
Avatar
Abbandona
Avatar
Gilles
Autore Risposta migliore

Hi Patrick,

We didn't find any solution, we had to create a new database and configure again. To avoid new problem, I made a backup before each module installation to be able to rollback if needed. Sorry ...

0
Avatar
Abbandona
Avatar
Patrick Miller
Risposta migliore

Hi Giles, did you ever find a solution? I'm having the same issue. Thanks.

0
Avatar
Abbandona
Avatar
el mehdi
Risposta migliore

Hello Gilles,

maybe the error came from an other module you did try to install before but you did not cancell installation, and is not compatible with the version of odoo you are using.


0
Avatar
Abbandona
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
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