This question has been flagged
1 Reply
346 Views

Hello,


I need to install a v14 CE on a debian 12.

I have an error when creating a database.


I've already tried a lot of things (changing the version of postgresql, versions of python libraries ...)


My database is created but some tables seem to be missing (error psycopg2.errors.UndefinedTable: relation "ir_model" does not exist LINE 1: SELECT * FROM ir_model WHERE state='manual')


Here are the various information and logs


Thanks in advance for your help


Debian versions

===============

12.4


Python version

==============

Python 3.11.2


Python libraries version

========================

Package            Version

------------------ ------------

appdirs            1.4.4

attrs              23.1.0

Babel              2.14.0

beautifulsoup4     4.12.2

cached-property    1.5.2

certifi            2023.11.17

cffi               1.16.0

charset-normalizer 3.3.2

cryptography       41.0.7

decorator          5.1.1

defusedxml         0.7.1

docopt             0.6.2

docutils           0.20.1

ebaysdk            2.2.0

freezegun          1.4.0

gevent             23.9.1

greenlet           3.0.2

html2text          2020.1.16

idna               3.6

isodate            0.6.1

Jinja2             3.1.2

libsass            0.22.0

lxml               4.9.2

MarkupSafe         2.1.3

num2words          0.5.13

ofxparse           0.21

packaging          21.3

passlib            1.7.4

Pillow             10.1.0

pip                23.3.2

platformdirs       4.1.0

polib              1.2.0

psutil             5.9.7

psycopg2           2.9.9

pyasn1             0.5.1

pyasn1-modules     0.3.0

pycparser          2.21

pydot              1.4.2

pyOpenSSL          23.3.0

pyparsing          3.1.1

PyPDF2             3.0.1

pypng              0.20220715.0

pyserial           3.5

python-dateutil    2.8.2

python-ldap        3.4.4

python-stdnum      1.19

pytz               2023.3.post1

pyusb              1.2.1

qrcode             7.4.2

reportlab          4.0.8

requests           2.31.0

requests-file      1.5.1

requests-toolbelt  1.0.0

setuptools         69.0.2

six                1.16.0

soupsieve          2.5

typing_extensions  4.9.0

urllib3            2.1.0

vobject            0.9.6.1

Werkzeug           2.0.2

wheel              0.42.0

xlrd               2.0.1

XlsxWriter         3.1.9

xlwt               1.3.0

zeep               4.2.1

zope.event         5.0

zope.interface     6.1


Postgresql version

==================

psql (PostgreSQL) 11.22 (Debian 11.22-1.pgdg120+1)


Odoo Logfile

================

2023-12-22 11:16:06,338 53112 INFO ? odoo: Odoo version 14.0

2023-12-22 11:16:06,338 53112 INFO ? odoo: Using configuration file at /etc/odoo.conf

2023-12-22 11:16:06,338 53112 INFO ? odoo: addons paths: ['/opt/odoo/odoo/addons', '/home/odoo/.local/share/Odoo/addons/14.0', '/opt/odoo/addons']

2023-12-22 11:16:06,339 53112 INFO ? odoo: database: odoo14@default:default

2023-12-22 11:16:06,432 53112 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/bin/wkhtmltopdf

2023-12-22 11:16:06,538 53112 INFO ? odoo.service.server: HTTP service (werkzeug) running on debian\-ascoma\.ascoma\.com:8069

2023\-12\-22\ 11:16:26,461\ 53112\ INFO\ \?\ odoo\.http:\ HTTP\ Configuring\ static\ files

2023\-12\-22\ 11:16:26,469\ 53112\ INFO\ \?\ odoo\.http:\ Generating\ nondb\ routing

2023\-12\-22\ 11:16:26,484\ 53112\ INFO\ \?\ werkzeug:\ 10\.1\.10\.1\ \-\ \-\ \[22/Dec/2023\ 11:16:26\]\ "GET\ /\ HTTP/1\.1"\ 303\ \-\ 1\ 0\.001\ 0\.018

2023\-12\-22\ 11:16:26,496\ 53112\ INFO\ \?\ werkzeug:\ 10\.1\.10\.1\ \-\ \-\ \[22/Dec/2023\ 11:16:26\]\ "GET\ /web\ HTTP/1\.1"\ 303\ \-\ 2\ 0\.003\ 0\.007

2023\-12\-22\ 11:16:26,526\ 53112\ INFO\ \?\ werkzeug:\ 10\.1\.10\.1\ \-\ \-\ \[22/Dec/2023\ 11:16:26\]\ "GET\ /web/database/selector\ HTTP/1\.1"\ 200\ \-\ 2\ 0\.002\ 0\.024

2023\-12\-22\ 11:17:21,964\ 53112\ INFO\ None\ odoo\.service\.db:\ Create\ database\ `base_odoo`\.

2023\-12\-22\ 11:17:22,693\ 53112\ INFO\ base_odoo\ odoo\.modules\.loading:\ loading\ 1\ modules\.\.\.

2023\-12\-22\ 11:17:22,694\ 53112\ INFO\ base_odoo\ odoo\.modules\.loading:\ Loading\ module\ base\ \(1/1\)

2023\-12\-22\ 11:17:22,751\ 53112\ INFO\ base_odoo\ odoo\.modules\.registry:\ module\ base:\ creating\ or\ updating\ database\ tables

2023\-12\-22\ 11:17:23,486\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ ir\.module\.module\.menus_by_module

2023\-12\-22\ 11:17:23,486\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ ir\.module\.module\.reports_by_module

2023\-12\-22\ 11:17:23,486\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ ir\.module\.module\.views_by_module

2023\-12\-22\ 11:17:23,487\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ res\.partner\.display_name

2023\-12\-22\ 11:17:23,487\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ res\.partner\.partner_share

2023\-12\-22\ 11:17:23,487\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ res\.partner\.commercial_partner_id

2023\-12\-22\ 11:17:23,487\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ res\.partner\.commercial_company_name

2023\-12\-22\ 11:17:23,488\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ res\.currency\.decimal_places

2023\-12\-22\ 11:17:23,489\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ res\.company\.logo_web

2023\-12\-22\ 11:17:23,492\ 53112\ INFO\ base_odoo\ odoo\.models:\ Storing\ computed\ values\ of\ res\.users\.share

2023\-12\-22\ 11:17:24,259\ 53112\ INFO\ base_odoo\ odoo\.modules\.loading:\ loading\ base/data/res\.lang\.csv

2023\-12\-22\ 11:17:24,302\ 53112\ INFO\ base_odoo\ odoo\.modules\.loading:\ loading\ base/data/res_lang_data\.xml

2023\-12\-22\ 11:17:24,317\ 53112\ INFO\ base_odoo\ odoo\.modules\.loading:\ loading\ base/data/res_partner_data\.xml

2023\-12\-22\ 11:17:24,339\ 53112\ WARNING\ base_odoo\ odoo\.modules\.loading:\ Transient\ module\ states\ were\ reset

2023\-12\-22\ 11:17:24,340\ 53112\ ERROR\ base_odoo\ odoo\.modules\.registry:\ Failed\ to\ load\ registry

Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 677,\ in\ _tag_root

 \  \ f\(rec\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 489,\ in\ _tag_record

 \  \ env\ =\ self\.get_env\(rec\)

 \  \  \  \  \ \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 226,\ in\ get_env

 \  \ \*\*safe_eval\(context,\ \{

 \  \  \ \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 37,\ in\

 \  \ safe_eval\ =\ lambda\ expr,\ ctx=\{\}:\ s_eval\(expr,\ ctx,\ nocopy=True\)

 \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/safe_eval\.py",\ line\ 329,\ in\ safe_eval

 \  \ c\ =\ test_expr\(expr,\ _SAFE_OPCODES,\ mode=mode\)

 \  \  \  \ \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/safe_eval\.py",\ line\ 190,\ in\ test_expr

 \  \ assert_valid_codeobj\(allowed_codes,\ code_obj,\ expr\)

 \ File\ "/opt/odoo/odoo/tools/safe_eval\.py",\ line\ 167,\ in\ assert_valid_codeobj

 \  \ raise\ ValueError\("forbidden\ opcode\(s\)\ in\ %r:\ %s"\ %\ \(expr,\ ',\ '\.join\(opname\[x\]\ for\ x\ in\ \(code_codes\ \-\ allowed_codes\)\)\)\)

ValueError:\ forbidden\ opcode\(s\)\ in\ "\{'default_is_company':\ True\}":\ RESUME


The\ above\ exception\ was\ the\ direct\ cause\ of\ the\ following\ exception:


Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/opt/odoo/odoo/modules/registry\.py",\ line\ 89,\ in\ new

 \  \ odoo\.modules\.load_modules\(registry\._db,\ force_demo,\ status,\ update_module\)

 \ File\ "/opt/odoo/odoo/modules/loading\.py",\ line\ 400,\ in\ load_modules

 \  \ loaded_modules,\ processed_modules\ =\ load_module_graph\(

 \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \ \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/modules/loading\.py",\ line\ 222,\ in\ load_module_graph

 \  \ load_data\(cr,\ idref,\ mode,\ kind='data',\ package=package\)

 \ File\ "/opt/odoo/odoo/modules/loading\.py",\ line\ 69,\ in\ load_data

 \  \ tools\.convert_file\(cr,\ package\.name,\ filename,\ idref,\ mode,\ noupdate,\ kind\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 733,\ in\ convert_file

 \  \ convert_xml_import\(cr,\ module,\ fp,\ idref,\ mode,\ noupdate\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 799,\ in\ convert_xml_import

 \  \ obj\.parse\(doc\.getroot\(\)\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 719,\ in\ parse

 \  \ self\._tag_root\(de\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 677,\ in\ _tag_root

 \  \ f\(rec\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 681,\ in\ _tag_root

 \  \ raise\ ParseError\('while\ parsing\ %s:%s,\ near\n%s'\ %\ \(

odoo\.tools\.convert\.ParseError:\ while\ parsing\ /opt/odoo/odoo/addons/base/data/res_partner_data\.xml:4,\ near

 \  \  \  \  \  \ My\ Company

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \

2023\-12\-22\ 11:17:24,341\ 53112\ ERROR\ base_odoo\ odoo\.service\.db:\ CREATE\ DATABASE\ failed:

Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 677,\ in\ _tag_root

 \  \ f\(rec\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 489,\ in\ _tag_record

 \  \ env\ =\ self\.get_env\(rec\)

 \  \  \  \  \ \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 226,\ in\ get_env

 \  \ \*\*safe_eval\(context,\ \{

 \  \  \ \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 37,\ in\

 \  \ safe_eval\ =\ lambda\ expr,\ ctx=\{\}:\ s_eval\(expr,\ ctx,\ nocopy=True\)

 \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/safe_eval\.py",\ line\ 329,\ in\ safe_eval

 \  \ c\ =\ test_expr\(expr,\ _SAFE_OPCODES,\ mode=mode\)

 \  \  \  \ \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/safe_eval\.py",\ line\ 190,\ in\ test_expr

 \  \ assert_valid_codeobj\(allowed_codes,\ code_obj,\ expr\)

 \ File\ "/opt/odoo/odoo/tools/safe_eval\.py",\ line\ 167,\ in\ assert_valid_codeobj

 \  \ raise\ ValueError\("forbidden\ opcode\(s\)\ in\ %r:\ %s"\ %\ \(expr,\ ',\ '\.join\(opname\[x\]\ for\ x\ in\ \(code_codes\ \-\ allowed_codes\)\)\)\)

ValueError:\ forbidden\ opcode\(s\)\ in\ "\{'default_is_company':\ True\}":\ RESUME


The\ above\ exception\ was\ the\ direct\ cause\ of\ the\ following\ exception:


Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/opt/odoo/odoo/service/db\.py",\ line\ 63,\ in\ _initialize_db

 \  \ registry\ =\ odoo\.modules\.registry\.Registry\.new\(db_name,\ demo,\ None,\ update_module=True\)

 \  \  \  \  \  \  \  \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/modules/registry\.py",\ line\ 89,\ in\ new

 \  \ odoo\.modules\.load_modules\(registry\._db,\ force_demo,\ status,\ update_module\)

 \ File\ "/opt/odoo/odoo/modules/loading\.py",\ line\ 400,\ in\ load_modules

 \  \ loaded_modules,\ processed_modules\ =\ load_module_graph\(

 \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \ \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/modules/loading\.py",\ line\ 222,\ in\ load_module_graph

 \  \ load_data\(cr,\ idref,\ mode,\ kind='data',\ package=package\)

 \ File\ "/opt/odoo/odoo/modules/loading\.py",\ line\ 69,\ in\ load_data

 \  \ tools\.convert_file\(cr,\ package\.name,\ filename,\ idref,\ mode,\ noupdate,\ kind\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 733,\ in\ convert_file

 \  \ convert_xml_import\(cr,\ module,\ fp,\ idref,\ mode,\ noupdate\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 799,\ in\ convert_xml_import

 \  \ obj\.parse\(doc\.getroot\(\)\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 719,\ in\ parse

 \  \ self\._tag_root\(de\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 677,\ in\ _tag_root

 \  \ f\(rec\)

 \ File\ "/opt/odoo/odoo/tools/convert\.py",\ line\ 681,\ in\ _tag_root

 \  \ raise\ ParseError\('while\ parsing\ %s:%s,\ near\n%s'\ %\ \(

odoo\.tools\.convert\.ParseError:\ while\ parsing\ /opt/odoo/odoo/addons/base/data/res_partner_data\.xml:4,\ near

 \  \  \  \  \  \ My\ Company

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \  \  \

 \  \  \  \

2023\-12\-22\ 11:17:24,345\ 53112\ INFO\ base_odoo\ odoo\.modules\.loading:\ loading\ 1\ modules\.\.\.

2023\-12\-22\ 11:17:24,355\ 53112\ INFO\ base_odoo\ odoo\.modules\.loading:\ 1\ modules\ loaded\ in\ 0\.01s,\ 0\ queries\ \(\+0\ extra\)

2023\-12\-22\ 11:17:24,356\ 53112\ ERROR\ base_odoo\ odoo\.sql_db:\ bad\ query:\ SELECT\ \*\ FROM\ ir_model\ WHERE\ state='manual'

ERROR:\ relation\ "ir_model"\ does\ not\ exist

LINE\ 1:\ SELECT\ \*\ FROM\ ir_model\ WHERE\ state='manual'

 \  \  \  \  \  \  \  \  \  \  \ \^


2023\-12\-22\ 11:17:24,356\ 53112\ WARNING\ base_odoo\ odoo\.modules\.loading:\ Transient\ module\ states\ were\ reset

2023\-12\-22\ 11:17:24,357\ 53112\ ERROR\ base_odoo\ odoo\.modules\.registry:\ Failed\ to\ load\ registry

Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/opt/odoo/odoo/modules/registry\.py",\ line\ 63,\ in\ __new__

 \  \ return\ cls\.registries\[db_name\]

 \  \  \  \  \  \~\~\~\~\~\~\~\~\~\~\~\~\~\~\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/func\.py",\ line\ 71,\ in\ wrapper

 \  \ return\ func\(self,\ \*args,\ \*\*kwargs\)

 \  \  \  \  \  \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/tools/lru\.py",\ line\ 34,\ in\ __getitem__

 \  \ a\ =\ self\.d\[obj\]

 \  \  \  \ \~\~\~\~\~\~\^\^\^\^\^

KeyError:\ 'base_odoo'


During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:


Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/opt/odoo/odoo/modules/registry\.py",\ line\ 89,\ in\ new

 \  \ odoo\.modules\.load_modules\(registry\._db,\ force_demo,\ status,\ update_module\)

 \ File\ "/opt/odoo/odoo/modules/loading\.py",\ line\ 407,\ in\ load_modules

 \  \ registry\.setup_models\(cr\)

 \ File\ "/opt/odoo/odoo/modules/registry\.py",\ line\ 263,\ in\ setup_models

 \  \ env\['ir\.model'\]\._add_manual_models\(\)

 \ File\ "/opt/odoo/odoo/addons/base/models/ir_model\.py",\ line\ 432,\ in\ _add_manual_models

 \  \ cr\.execute\('SELECT\ \*\ FROM\ ir_model\ WHERE\ state=%s',\ \['manual'\]\)

 \ File\ "/home/odoo/odoo\-env/lib/python3\.11/site\-packages/decorator\.py",\ line\ 232,\ in\ fun

 \  \ return\ caller\(func,\ \*\(extras\ \+\ args\),\ \*\*kw\)

 \  \  \  \  \  \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/sql_db\.py",\ line\ 101,\ in\ check

 \  \ return\ f\(self,\ \*args,\ \*\*kwargs\)

 \  \  \  \  \  \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^

 \ File\ "/opt/odoo/odoo/sql_db.py", line 301, in execute

    res = self._obj.execute(query, params)

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

psycopg2.errors.UndefinedTable: relation "ir_model" does not exist

LINE 1: SELECT * FROM ir_model WHERE state='manual'

                      ^


2023-12-22 11:17:24,392 53112 INFO base_odoo odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'user=odoo14 password=xxx dbname=base_odoo sslmode=prefer'

2023-12-22 11:17:24,394 53112 INFO base_odoo werkzeug: 10.1.10.1 - - [22/Dec/2023 11:17:24] "POST /web/database/create HTTP/1.1" 200 - 5049 1.871 0.590


Avatar
Discard
Best Answer

Check Odoo's access to the filestore path, whcih was the culprit when I had this issue.

Avatar
Discard