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

[10.0] Database collapsed all of a sudden

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
postgresqlquerysqlwebsiteodoo10
8 Respostas
8328 Visualizações
Avatar
Jurre Claassen

Yesterday all of a sudden my database collapsed. At first I thought it was a caching issue when switching between databases, but it turned out to be another problem.


I backed up the database and moved it to a localhost to be SURE it wasn't a caching issue, but still no result. Excerpt of the error from odoo.log and postgres.log are below.

I've tried setting the state of website to uninstalled through the database, in hopes of fixing it, but no result whatshowever.  Also, tried changing locale, but it seems to go wrong in building the query. It expects a boolean where it returns an integer. 

Please help me on this issue, I've been breaking my head on it for about 1.5 days now, I'm sure its a minor issue I've overlooked somewhere.

Odoo.log


2016-10-28 09:50:44,295 2715 INFO fixme werkzeug: 192.168.10.181 - - [28/Oct/2016 09:50:44] "GET /web?db=fixme HTTP/1.1" 303 -2016-10-28 09:50:44,311 2715 INFO fixme odoo.sql_db: bad query: SELECT MAX(CASE WHEN perm_read THEN 1 ELSE 0 END)                              FROM ir_model_access a                              JOIN ir_model m ON (m.id = a.model_id)                              JOIN res_groups_users_rel gu ON (gu.gid = a.group_id)                             WHERE m.model = 'website'                               AND gu.uid = false                               AND a.active IS TRUE2016-10-28 09:50:44,322 2715 INFO fixme werkzeug: 192.168.10.181 - - [28/Oct/2016 09:50:44] "GET /web/login HTTP/1.1" 500 -2016-10-28 09:50:44,347 2715 ERROR fixme werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi    execute(self.server.app)  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute    application_iter = app(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/service/server.py", line 246, in app    return self.app(e, s)  File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 184, in application    return application_unproxied(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 170, in application_unproxied    result = handler(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1306, in __call__    return self.dispatch(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1280, in __call__    return self.app(environ, start_wrapped)  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__    return self.app(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1471, in dispatch    result = ir_http._dispatch()  File "/usr/lib/python2.7/dist-packages/odoo/addons/website_sale/models/ir_http.py", line 15, in _dispatch    return super(IrHttp, cls)._dispatch()  File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/ir_http.py", line 166, in _dispatch    langs = [lg[0] for lg in request.website.get_languages()]  File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/website.py", line 349, in get_languages    return self._get_languages()  File "<string>", line 2, in _get_languages
  File "/usr/lib/python2.7/dist-packages/odoo/tools/cache.py", line 87, in lookup    value = d[key] = self.method(*args, **kwargs)  File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/website.py", line 353, in _get_languages    return [(lg.code, lg.name) for lg in self.language_ids]  File "/usr/lib/python2.7/dist-packages/odoo/fields.py", line 860, in __get__    self.determine_value(record)  File "/usr/lib/python2.7/dist-packages/odoo/fields.py", line 962, in determine_value    record._prefetch_field(self)  File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 3051, in _prefetch_field    result = records.read([f.name for f in fs], load='_classic_write')  File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 2972, in read    self.check_access_rights('read')  File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 3270, in check_access_rights    return self.env['ir.model.access'].check(self._name, operation, raise_exception)  File "<string>", line 2, in check
  File "/usr/lib/python2.7/dist-packages/odoo/tools/cache.py", line 87, in lookup    value = d[key] = self.method(*args, **kwargs)  File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_model.py", line 840, in check    (model_name, self._uid,))  File "/usr/lib/python2.7/dist-packages/odoo/sql_db.py", line 141, in wrapper    return f(self, *args, **kwargs)  File "/usr/lib/python2.7/dist-packages/odoo/sql_db.py", line 218, in execute    res = self._obj.execute(query, params)ProgrammingError: operator does not exist: integer = booleanLINE 6:                                AND gu.uid = false                                                  ^HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.


Postgres.log


2016-10-28 11:50:37 CEST STATEMENT:  SELECT MAX(CASE WHEN perm_read THEN 1 ELSE 0 END)	                              FROM ir_model_access a	                              JOIN ir_model m ON (m.id = a.model_id)	                              JOIN res_groups_users_rel gu ON (gu.gid = a.group_id)	                             WHERE m.model = 'website'	                               AND gu.uid = false	                               AND a.active IS TRUE2016-10-28 11:50:44 CEST ERROR:  operator does not exist: integer = boolean at character 354
1
Avatar
Cancelar
Ermin Trevisan

Could you please be so kind and reformat your post?

Yenthe Van Ginneken (Mainframe Monkey)

Yeah, just tried that. but for some reason I keep getting a 403 error when submitting the reformatted post.

So pasted at codesnippet http://paste.ofcode.org/3a7pvjtsDJRsgWMbNjQaJus

Avatar
Rion Ahmed
Melhor resposta

Is anyone find the solution?

0
Avatar
Cancelar
Avatar
Marina Boules
Melhor resposta

Because website user (user_id) is public user that created as user on users list. 

So if you removed public user from users list, website will be stopped and give this error.

0
Avatar
Cancelar
Avatar
Paul Catinean
Melhor resposta

After quite a bit of investigation I've traced the issue to this line: https://github.com/odoo/odoo/blob/10.0/addons/website/models/ir_http.py#L65


Apparently the website object has a non-required field user_id which should point to the default Public User. For some undiscovered reason that field can set to an empty value and then the aforementioned line sets the uid on the request to False.

One would have to update the user_id value in the database with the daabase id of the portal user to restore normal function, in the meantime I will also make a PR to check the value of user_id on the website or make user_id required to avoid this in the future.

Hope this helps.


[LATER EDIT]

Here is the PR in question: https://github.com/odoo/odoo/pull/21997

0
Avatar
Cancelar
Avatar
Nguyen Quoc Dat
Melhor resposta

Did anyone have a solution for this?

0
Avatar
Cancelar
Avatar
Jurre Claassen
Autor Melhor resposta

Just tried repairing the database with the -d parameter, still same error. Thanks for the suggestion.

Can't reply to answers yet due to lack of karma

0
Avatar
Cancelar
Avatar
保定-粉刷匠
Melhor resposta

You can update you database,using parameter '-D YourDatabaseName -U all‘ when you start odoo.

Try this.


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
Publicações relacionadas Respostas Visualizações Atividade
how to query from posgreSQL in odoo 10 website
postgresql query sql odoo10
Avatar
Avatar
1
fev. 18
5097
SQL Query for many2many Resolvido
postgresql sql odoo odoo10
Avatar
Avatar
Avatar
Avatar
Avatar
13
jul. 24
15479
How to get value manual ORDER BY from Query
postgresql query odoo odoo10
Avatar
Avatar
1
jul. 19
6171
Check on value in multiple database columns
postgresql query
Avatar
Avatar
Avatar
2
mai. 24
2269
How to migrate data from Odoo 10 enterprise with PostgreSQL 9.5 to PostgreSQL 12?
postgresql odoo10
Avatar
Avatar
1
nov. 23
3354
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