Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

DB error when installing app.

Odebírat

Get notified when there's activity on this post

This question has been flagged
databasepostgresqldockerodoo11Docker
4485 Zobrazení
Avatar
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
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Odoo 16.0 Docker - Role "odoo" does not exist
postgresql docker
Avatar
Avatar
Avatar
2
lis 23
4842
Database Migration
database postgresql
Avatar
Avatar
1
čvc 23
6780
PostgreSQL Idle connections and docker Vyřešeno
postgresql docker
Avatar
Avatar
4
úno 22
24941
Can't access to the database created by the docker-compose file
postgresql Docker
Avatar
Avatar
1
zář 20
7388
How to do debug in odoo 11, running in a docker (I want to capture variables)
docker odoo11
Avatar
0
čvn 19
3539
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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