Pular para o conteúdo
Odoo Menu
  • Entrar
  • Experimente grátis
  • Aplicativos
    Finanças
    • Financeiro
    • Faturamento
    • Despesas
    • Planilhas (BI)
    • Documentos
    • Assinar Documentos
    Vendas
    • CRM
    • Vendas
    • PDV Loja
    • PDV Restaurantes
    • Assinaturas
    • Locação
    Websites
    • Criador de Sites
    • e-Commerce
    • Blog
    • Fórum
    • Chat ao Vivo
    • e-Learning
    Cadeia de mantimentos
    • Inventário
    • Fabricação
    • PLM - Ciclo de Vida do Produto
    • Compras
    • Manutenção
    • Qualidade
    Recursos Humanos
    • Funcionários
    • Recrutamento
    • Folgas
    • Avaliações
    • Indicações
    • Frota
    Marketing
    • Redes Sociais
    • Marketing por E-mail
    • Marketing por SMS
    • Eventos
    • Automação de Marketing
    • Pesquisas
    Serviços
    • Projeto
    • Planilhas de Horas
    • Serviço de Campo
    • Central de Ajuda
    • Planejamento
    • Compromissos
    Produtividade
    • Mensagens
    • Aprovações
    • Internet das Coisas
    • VoIP
    • Conhecimento
    • WhatsApp
    Aplicativos de terceiros Odoo Studio Plataforma Odoo Cloud
  • Setores
    Varejo
    • Loja de livros
    • Loja de roupas
    • Loja de móveis
    • Mercearia
    • Loja de ferramentas
    • Loja de brinquedos
    Comida e hospitalidade
    • Bar e Pub
    • Restaurante
    • Fast Food
    • Hospedagem
    • Distribuidor de bebidas
    • Hotel
    Imóveis
    • Imobiliária
    • Escritório de arquitetura
    • Construção
    • Administração de propriedades
    • Jardinagem
    • Associação de proprietários de imóveis
    Consultoria
    • Escritório de Contabilidade
    • Parceiro Odoo
    • Agência de marketing
    • Escritório de advocacia
    • Aquisição de talentos
    • Auditoria e Certificação
    Fabricação
    • Têxtil
    • Metal
    • Móveis
    • Alimentação
    • Cervejaria
    • Presentes corporativos
    Saúde e Boa forma
    • Clube esportivo
    • Loja de óculos
    • Academia
    • Profissionais de bem-estar
    • Farmácia
    • Salão de cabeleireiro
    Comércio
    • Handyman
    • Hardware e Suporte de TI
    • Sistemas de energia solar
    • Sapataria
    • Serviços de limpeza
    • Serviços de climatização
    Outros
    • Organização sem fins lucrativos
    • Agência Ambiental
    • Aluguel de outdoors
    • Fotografia
    • Aluguel de bicicletas
    • Revendedor de software
    Navegar por todos os setores
  • Comunidade
    Aprenda
    • Tutoriais
    • Documentação
    • Certificações
    • Treinamento
    • Blog
    • Podcast
    Empodere a Educação
    • Programa de educação
    • Scale Up! Jogo de Negócios
    • Visite a Odoo
    Obtenha o Software
    • Baixar
    • Comparar edições
    • Releases
    Colaborar
    • Github
    • Fórum
    • Eventos
    • Traduções
    • Torne-se um parceiro
    • Serviços para parceiros
    • Cadastre seu escritório contábil
    Obtenha os serviços
    • Encontre um parceiro
    • Encontre um Contador
    • Conheça um consultor
    • Serviços de Implementação
    • Referências de Clientes
    • Suporte
    • Upgrades
    Github YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Faça uma demonstração
  • Preços
  • Ajuda

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

  • CRM
  • e-Commerce
  • Financeiro
  • Inventário
  • PoS
  • Projeto
  • MRP
All apps
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
Ajuda

Problem installing Inventory management module

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
6 Respostas
6958 Visualizações
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
Cancelar
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
Melhor resposta

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
Cancelar
Avatar
Gilles
Autor Melhor resposta

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
Cancelar
Avatar
Patrick Miller
Melhor resposta

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

0
Avatar
Cancelar
Avatar
el mehdi
Melhor resposta

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
Cancelar
Está gostando da discussão? Não fique apenas lendo, participe!

Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!

Inscreva-se
Comunidade
  • Tutoriais
  • Documentação
  • Fórum
Open Source
  • Baixar
  • Github
  • Runbot
  • Traduções
Serviços
  • Odoo.sh Hosting
  • Suporte
  • Upgrade
  • Desenvolvimentos personalizados
  • Educação
  • Encontre um Contador
  • Encontre um parceiro
  • Torne-se um parceiro
Sobre nós
  • Nossa empresa
  • Ativos da marca
  • Contato
  • Empregos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidade
  • Segurança
الْعَرَبيّة 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 é um conjunto de aplicativos de negócios em código aberto que cobre todas as necessidades de sua empresa: CRM, comércio eletrônico, contabilidade, estoque, ponto de venda, gerenciamento de projetos, etc.

A proposta de valor exclusiva Odoo é ser, ao mesmo tempo, muito fácil de usar e totalmente integrado.

Site feito com

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