Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

click-odoo-update: using wrong db_name without -d #111

Open
odoo-sh opened this issue Mar 2, 2022 · 1 comment
Open

click-odoo-update: using wrong db_name without -d #111

odoo-sh opened this issue Mar 2, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@odoo-sh
Copy link

odoo-sh commented Mar 2, 2022

Hello,

We are using click-odoo-update using marabunta and it looks liek click-odoo-update unable to use the database from ODOO_RC.
Specifying the database eg: click-odoo-update -d <db> Works!

Marbaunta.yml

migration:
  options:
    install_command: odoo
    install_args: --log-level=info
  versions:
    - version: setup
      backup: false
      operations:
        pre:
          - click-odoo-update
        post:
          - anthem songs.general::main

Log output:

|> version setup: click-odoo-update                                                                                                                                                          │
│ 2022-03-02 13:46:47,168 80 INFO ? odoo: Odoo version 14.0                                                                                                                                    │
│ 2022-03-02 13:46:47,169 80 INFO ? odoo: Using configuration file at /odoo/conf/odoo.cfg                                                                                                      │
│ 2022-03-02 13:46:47,169 80 INFO ? odoo: addons paths: ['/odoo/src/14.0/odoo/addons', '/odoo/data/addons/14.0', '/odoo/src/14.0-Ent', '/odoo/src/14.0/addons', '/odoo/src/abc/abc │
│ 2022-03-02 13:46:47,169 80 INFO ? odoo: database: odoo@review-develop-3zknud-postgresql:5432                                                                                                 │
│ 2022-03-02 13:46:47,194 80 ERROR ? odoo.sql_db: bad query: SELECT value FROM ir_config_parameter WHERE key='module_auto_update.installed_checksums'                                          │
│ ERROR: relation "ir_config_parameter" does not exist                                                                                                                                         │
│ LINE 1: SELECT value FROM ir_config_parameter WHERE key='module_auto...                                                                                                                      │
│                           ^                                                                                                                                                                  │
│                                                                                                                                                                                              │
│ 2022-03-02 13:46:47,196 80 ERROR ? click_odoo.env_options: exception                                                                                                                         │
│ Traceback (most recent call last):                                                                                                                                                           │
│   File "/home/odoo/.local/lib/python3.7/site-packages/click_odoo/env_options.py", line 208, in _invoke                                                                                       │
│     database=database, rollback=rollback, ctx=ctx                                                                                                                                            │
│   File "/usr/local/lib/python3.7/contextlib.py", line 112, in __enter__                                                                                                                      │
│     return next(self.gen)                                                                                                                                                                    │
│   File "/home/odoo/.local/lib/python3.7/site-packages/click_odoo_contrib/update.py", line 290, in OdooEnvironmentWithUpdate                                                                  │
│     ignore_addons,                                                                                                                                                                           │
│   File "/home/odoo/.local/lib/python3.7/site-packages/click_odoo_contrib/update.py", line 262, in _update_db                                                                                 │
│     ignore_addons,                                                                                                                                                                           │
│   File "/home/odoo/.local/lib/python3.7/site-packages/click_odoo_contrib/update.py", line 205, in _update_db_nolock                                                                          │
│     checksums = _load_installed_checksums(cr)                                                                                                                                                │
│   File "/home/odoo/.local/lib/python3.7/site-packages/click_odoo_contrib/update.py", line 146, in _load_installed_checksums                                                                  │
│     value = _get_param(cr, PARAM_INSTALLED_CHECKSUMS)                                                                                                                                        │
│   File "/home/odoo/.local/lib/python3.7/site-packages/click_odoo_contrib/update.py", line 129, in _get_param                                                                                 │
│     cr.execute("SELECT value FROM ir_config_parameter WHERE key=%s", (key,))                                                                                                                 │
│   File "<decorator-gen-3>", line 2, in execute                                                                                                                                               │
│   File "/odoo/src/14.0/odoo/sql_db.py", line 101, in check                                                                                                                                   │
│     return f(self, *args, **kwargs)                                                                                                                                                          │
│ Stream closed EOF for lasiestag-review-develop-3zknud/review-develop-3zknud-6db589fd6f-fmlrb (auto-deploy-app)
@odoo-sh
Copy link
Author

odoo-sh commented Mar 2, 2022

UPDATE: if we have an env value as PGDATABASE=odoo , then click-odoo-update using the env value. It should be default to option -d or config.

@sbidoul sbidoul added the enhancement New feature or request label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants