Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

DB error when installing app.

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
databasepostgresqldockerodoo11Docker
4493 Widoki
Awatar
Antoine Zen-Ruffinen

I wanted to test some modification I have done to Odoo V11 code (very simple changes). For this I have Odoo running on my development PC with all dependencies from requirements.txt inside a python virtual env. 

To run the database, instead of installing one on my PC, i choosed for simplicity to run postgresql from a Docker container. This it the command I use to start postgresql 9.5 server from docker:

docker run --name odoo-db -e POSTGRES_PASSWORD=mypassword -e POSTGRES_USER=odoo -d -p 5432:5432 postgres:9.5

For reference, this is my Odoo server configuration file (~/.odoorc):

[options]
admin_passwd = myadminpasswd
addons_path = /home/antoine/rnx/odoo/addons,/home/antoine/rnx/odoo-enterprise
csv_internal_sep = ,
db_host = localhost
db_password = mypassword
db_port = 5432
db_user = odoo

I can then start the Odoo server locally and create a new database without trouble using this postgresql server inside the docker container. But when I try to install an Odoo application , the following exception(s) is raised:

2017-11-06 07:55:03,488 3729 INFO test odoo.modules.loading: loading account_bank_statement_import/account_import_tip_data.xml 2017-11-06 07:55:03,491 3729 INFO test odoo.modules.loading: loading account_bank_statement_import/wizard/journal_creation.xml 2017-11-06 07:55:03,806 3729 INFO test odoo.modules.registry: module account_extension: creating or updating database tables 2017-11-06 07:55:03,820 3729 INFO test odoo.modules.loading: loading account_extension/views/account_report_menu_invisible.xml 2017-11-06 07:55:03,833 3729 ERROR test odoo.sql_db: bad query: b'INSERT INTO "ir_ui_menu" ("id", "active", "sequence", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval(\'ir_ui_menu_id_seq\'), false, 10, 1, 1, (now() at time zone \'UTC\'), (now() at time zone \'UTC\')) RETURNING id'
ERROR: null value in column "name" violates not-null constraint DETAIL: Failing row contains (145, null, null, null, f, 10, null, null, null, 1, 2017-11-06 07:55:03.812547, 1, 2017-11-06 07:55:03.812547).
2017-11-06 07:55:03,833 3729 ERROR test odoo.modules.registry: Failed to load registry Traceback (most recent call last):
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 741, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 651, in _tag_record
    id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
  File "/home/antoine/rnx/odoo/odoo/addons/base/ir/ir_model.py", line 1467, in _update
    record = record.create(values)
  File "/home/antoine/rnx/odoo/odoo/addons/base/ir/ir_ui_menu.py", line 150, in create
    return super(IrUiMenu, self).create(values)
  File "/home/antoine/rnx/odoo/odoo/models.py", line 3275, in create
    record = self.browse(self._create(old_vals))
  File "/home/antoine/rnx/odoo/odoo/models.py", line 3368, in _create
    cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))
  File "/home/antoine/rnx/odoo/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/home/antoine/rnx/odoo/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
psycopg2.IntegrityError: null value in column "name" violates not-null constraint DETAIL: Failing row contains (145, null, null, null, f, 10, null, null, null, 1, 2017-11-06 07:55:03.812547, 1, 2017-11-06 07:55:03.812547).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/antoine/rnx/odoo/odoo/modules/registry.py", line 84, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/antoine/rnx/odoo/odoo/modules/loading.py", line 343, in load_modules
    loaded_modules, update_module)
  File "/home/antoine/rnx/odoo/odoo/modules/loading.py", line 242, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/antoine/rnx/odoo/odoo/modules/loading.py", line 156, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/home/antoine/rnx/odoo/odoo/modules/loading.py", line 94, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 788, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 849, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 748, in parse
    exc_info[2]
  File "/home/antoine/rnx/odoo/odoo/tools/pycompat.py", line 86, in reraise
    raise value.with_traceback(tb)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 741, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 651, in _tag_record
    id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
  File "/home/antoine/rnx/odoo/odoo/addons/base/ir/ir_model.py", line 1467, in _update
    record = record.create(values)
  File "/home/antoine/rnx/odoo/odoo/addons/base/ir/ir_ui_menu.py", line 150, in create
    return super(IrUiMenu, self).create(values)
  File "/home/antoine/rnx/odoo/odoo/models.py", line 3275, in create
    record = self.browse(self._create(old_vals))
  File "/home/antoine/rnx/odoo/odoo/models.py", line 3368, in _create
    cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))
  File "/home/antoine/rnx/odoo/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/home/antoine/rnx/odoo/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
odoo.tools.convert.ParseError: "null value in column "name" violates not-null constraint DETAIL: Failing row contains (145, null, null, null, f, 10, null, null, null, 1, 2017-11-06 07:55:03.812547, 1, 2017-11-06 07:55:03.812547).
" while parsing /home/antoine/rnx/odoo-enterprise/account_extension/views/account_report_menu_invisible.xml:5, near
<record id="account.menu_account_report_tree_hierarchy" model="ir.ui.menu">
        <field name="active" eval="False"/>
    </record>
2017-11-06 07:55:03,848 3729 ERROR test odoo.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 741, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 651, in _tag_record
    id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
  File "/home/antoine/rnx/odoo/odoo/addons/base/ir/ir_model.py", line 1467, in _update
    record = record.create(values)
  File "/home/antoine/rnx/odoo/odoo/addons/base/ir/ir_ui_menu.py", line 150, in create
    return super(IrUiMenu, self).create(values)
  File "/home/antoine/rnx/odoo/odoo/models.py", line 3275, in create
    record = self.browse(self._create(old_vals))
  File "/home/antoine/rnx/odoo/odoo/models.py", line 3368, in _create
    cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))
  File "/home/antoine/rnx/odoo/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/home/antoine/rnx/odoo/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
psycopg2.IntegrityError: null value in column "name" violates not-null constraint DETAIL: Failing row contains (145, null, null, null, f, 10, null, null, null, 1, 2017-11-06 07:55:03.812547, 1, 2017-11-06 07:55:03.812547).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/antoine/rnx/odoo/odoo/http.py", line 646, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/antoine/rnx/odoo/odoo/http.py", line 307, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/antoine/rnx/odoo/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/home/antoine/rnx/odoo/odoo/http.py", line 683, in dispatch
    result = self._call_function(**self.params)
  File "/home/antoine/rnx/odoo/odoo/http.py", line 339, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/antoine/rnx/odoo/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/antoine/rnx/odoo/odoo/http.py", line 332, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/antoine/rnx/odoo/odoo/http.py", line 927, in __call__
    return self.method(*args, **kw)
  File "/home/antoine/rnx/odoo/odoo/http.py", line 512, in response_wrap
    response = f(*args, **kw)
  File "/home/antoine/rnx/odoo/addons/web/controllers/main.py", line 924, in call_button
    action = self._call_kw(model, method, args, {})
  File "/home/antoine/rnx/odoo/addons/web/controllers/main.py", line 912, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/antoine/rnx/odoo/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/home/antoine/rnx/odoo/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-39>", line 2, in button_immediate_install
  File "/home/antoine/rnx/odoo/odoo/addons/base/module/module.py", line 71, in check_and_log
    return method(self, *args, **kwargs)
  File "/home/antoine/rnx/odoo/odoo/addons/base/module/module.py", line 438, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/home/antoine/rnx/odoo/odoo/addons/base/module/module.py", line 531, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/home/antoine/rnx/odoo/odoo/modules/registry.py", line 84, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/antoine/rnx/odoo/odoo/modules/loading.py", line 343, in load_modules
    loaded_modules, update_module)
  File "/home/antoine/rnx/odoo/odoo/modules/loading.py", line 242, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/antoine/rnx/odoo/odoo/modules/loading.py", line 156, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/home/antoine/rnx/odoo/odoo/modules/loading.py", line 94, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 788, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 849, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 748, in parse
    exc_info[2]
  File "/home/antoine/rnx/odoo/odoo/tools/pycompat.py", line 86, in reraise
    raise value.with_traceback(tb)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 741, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/home/antoine/rnx/odoo/odoo/tools/convert.py", line 651, in _tag_record
    id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
  File "/home/antoine/rnx/odoo/odoo/addons/base/ir/ir_model.py", line 1467, in _update
    record = record.create(values)
  File "/home/antoine/rnx/odoo/odoo/addons/base/ir/ir_ui_menu.py", line 150, in create
    return super(IrUiMenu, self).create(values)
  File "/home/antoine/rnx/odoo/odoo/models.py", line 3275, in create
    record = self.browse(self._create(old_vals))
  File "/home/antoine/rnx/odoo/odoo/models.py", line 3368, in _create
    cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))
  File "/home/antoine/rnx/odoo/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/home/antoine/rnx/odoo/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
odoo.tools.convert.ParseError: "null value in column "name" violates not-null constraint DETAIL: Failing row contains (145, null, null, null, f, 10, null, null, null, 1, 2017-11-06 07:55:03.812547, 1, 2017-11-06 07:55:03.812547).
" while parsing /home/antoine/rnx/odoo-enterprise/account_extension/views/account_report_menu_invisible.xml:5, near
<record id="account.menu_account_report_tree_hierarchy" model="ir.ui.menu">
        <field name="active" eval="False"/>
    </record>


IThis does not occur if i run the same codebase against the postgresql server installed from ubuntu 16.04.


I don'k know well posgresql, but it looks like the query does not pass the DB consistency checks. It's sounds to me like something is miss-configured with the server from the Docker image. Can someone tell me what to change in the server ?


0
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Odoo 16.0 Docker - Role "odoo" does not exist
postgresql docker
Awatar
Awatar
Awatar
2
lis 23
4842
Database Migration
database postgresql
Awatar
Awatar
1
lip 23
6782
PostgreSQL Idle connections and docker Rozwiązane
postgresql docker
Awatar
Awatar
4
lut 22
24956
Can't access to the database created by the docker-compose file
postgresql Docker
Awatar
Awatar
1
wrz 20
7394
How to do debug in odoo 11, running in a docker (I want to capture variables)
docker odoo11
Awatar
0
cze 19
3539
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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