odoo / odoo/docker

Restore Odoo db from sh

Open
#471 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
1.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

I've dockerized Odoo 16 using enterprise version
version: '3.1'
services:
web:
image: odoo:16.0
user: root
depends_on:
- db
ports:
- "8987:8069"
- "20016:8072" # live chat
tty: true
command: --
environment:
- HOST=db
- USER=odoo
- PASSWORD=odoo
volumes:
#- /etc/timezone:/etc/timezone:ro
#- /etc/localtime:/etc/localtime:ro
# - ./entrypoint.sh:/entrypoint.sh # if you want to install additional Python packages, uncomment this line!
- ./addons:/mnt/extra-addons
- ./enterprise/odoo/addons:/mnt/enterprise-addons
- ./etc:/etc/odoo
restart: always
db:
image: postgres:14
user: root
environment:
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=odoo
- POSTGRES_DB=postgres
restart: always # run as a service
volumes:
- ./postgresql:/var/lib/postgresql/data
The point is that when i want to restore a database from odoo sh, it was restored but when i login in ,
it show me Error 500 and this is in the log

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

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1998, in call
response = request._serve_db()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1584, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1611, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1725, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 156, in _dispatch
result.flatten()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1099, in flatten
self.response.append(self.render())
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1091, in render
return request.env["ir.ui.view"]._render_template(self.template, self.qcontext)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 2125, in _render_template
return self.env['ir.qweb']._render(template, values)
File "/usr/lib/python3/dist-packages/odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 580, in _render
result = ''.join(rendering)
File "<191>", line 329, in template_191
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
ValueError: L'élément '' ne peut être localisé dans la vue parente
Template: web.webclient_bootstrap
Path: /t/t/t[1]/t[4]
Node:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied Docker Compose service definitions and the Odoo traceback, especially http.py, service/model.py, ir_http.py, ir_ui_view.py, and ir_qweb.py. Reproduce the login failure against the restored database and trace template web.webclient_bootstrap; done means the restored database loads without the reported Error 500.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, postgresql, python
Domain
backend, database, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.