Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
439 Vistas

Hi guys,


I have just spent three days creating a beautiful website for my business, and setting up my accounts and things, and I backed the database up using the database manager, and had to reinstall odoo and a few other things due to another system issue (in Ubuntu).


My issue is - I've restored the database, and when I select the database I get an error 500 (but odoo is the same version both backed up and restoring).  I checked the journal log and it shows this error.  


I am absolutely desperate to correct this so I don't have to redesign everything! :(


root@mail:/var/log/apache2# sudo journalctl -u odoo
May 31 14:24:48 mail.labworx.au odoo[19417]: 2025-05-31 14:24:48,325 19417 ERROR goneflying2 odoo.http: Exception during request handling.
May 31 14:24:48 mail.labworx.au odoo[19417]: Traceback (most recent call last):
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "<186>", line 51, in template_web_login_layout_186
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "<186>", line 40, in template_web_login_layout_186_content
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "<545>", line 5, in not_found_template
May 31 14:24:48 mail.labworx.au odoo[19417]: ValueError: Element '<xpath expr="//header//nav">' cannot be located in parent view
May 31 14:24:48 mail.labworx.au odoo[19417]: The above exception was the direct cause of the following exception:
May 31 14:24:48 mail.labworx.au odoo[19417]: Traceback (most recent call last):
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "/opt/odoo/odoo/odoo/http.py", line 2480, in __call__
May 31 14:24:48 mail.labworx.au odoo[19417]:     response = request._serve_db()
May 31 14:24:48 mail.labworx.au odoo[19417]:                ^^^^^^^^^^^^^^^^^^^
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "/opt/odoo/odoo/odoo/http.py", line 1983, in _serve_db
May 31 14:24:48 mail.labworx.au odoo[19417]:     return self._transactioning(
May 31 14:24:48 mail.labworx.au odoo[19417]:            ^^^^^^^^^^^^^^^^^^^^^
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "/opt/odoo/odoo/odoo/http.py", line 2047, in _transactioning
May 31 14:24:48 mail.labworx.au odoo[19417]:     return service_model.retrying(func, env=self.env)
May 31 14:24:48 mail.labworx.au odoo[19417]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "/opt/odoo/odoo/odoo/service/model.py", line 176, in retrying
May 31 14:24:48 mail.labworx.au odoo[19417]:     result = func()
May 31 14:24:48 mail.labworx.au odoo[19417]:              ^^^^^^
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "/opt/odoo/odoo/odoo/http.py", line 2014, in _serve_ir_http
May 31 14:24:48 mail.labworx.au odoo[19417]:     response = self.dispatcher.dispatch(rule.endpoint, args)
May 31 14:24:48 mail.labworx.au odoo[19417]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "/opt/odoo/odoo/odoo/http.py", line 2183, in dispatch
May 31 14:24:48 mail.labworx.au odoo[19417]:     return self.request.registry['ir.http']._dispatch(endpoint)
May 31 14:24:48 mail.labworx.au odoo[19417]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 31 14:24:48 mail.labworx.au odoo[19417]:   File "/opt/odoo/odoo/odoo/addons/base/models/ir_http.py", line 356, in _dispatch
May 31 14:24:48 mail.labworx.au odoo[19417]:     result.flatten()
M


Is there something I can do (please) that I can fix this issue without having to lose my entire backed up database? :(

Avatar
Descartar
Autor

I've just jumped into command line, and noticed this:

(but how do I find out what the dependencies are to reinstall them? :/


2025-05-31 15:32:37,123 39301 INFO goneflying3 odoo.modules.loading: loading 1 modules...
2025-05-31 15:32:37,127 39301 INFO goneflying3 odoo.modules.loading: 1 modules loaded in 0.00s, 0 queries (+0 extra)
2025-05-31 15:32:37,146 39301 INFO goneflying3 odoo.modules.module_graph: module website_blog: some depends are not loaded, skipped
2025-05-31 15:32:37,147 39301 INFO goneflying3 odoo.modules.module_graph: module website_event: some depends are not loaded, skipped
2025-05-31 15:32:37,147 39301 INFO goneflying3 odoo.modules.module_graph: module website: some depends are not loaded, skipped
2025-05-31 15:32:37,147 39301 INFO goneflying3 odoo.modules.module_graph: module website_slides: its direct/indirect dependency is skipped, skipped
2025-05-31 15:32:37,147 39301 INFO goneflying3 odoo.modules.module_graph: module theme_default: its direct/indirect dependency is skipped, skipped
2025-05-31 15:32:37,147 39301 INFO goneflying3 odoo.modules.module_graph: module website_sms: its direct/indirect dependency is skipped, skipped
2025-05-31 15:32:37,147 39301 INFO goneflying3 odoo.modules.module_graph: module website_mail: some depends are not loaded, skipped
2025-05-31 15:32:37,147 39301 INFO goneflying3 odoo.modules.module_graph: module website_payment: some depends are not loaded, skipped
2025-05-31 15:32:37,147 39301 INFO goneflying3 odoo.modules.module_graph: module website_partner: some depends are not loaded, skipped
2025-05-31 15:32:37,147 39301 INFO goneflying3 odoo.modules.module_graph: module website_profile: its direct/indirect dependency is skipped, skipped
2025-05-31 15:32:37,148 39301 INFO goneflying3 odoo.modules.module_graph: module website_project: some depends are not loaded, skipped
2025-05-31 15:32:37,148 39301 INFO goneflying3 odoo.modules.loading: loading 65 modules...
2025-05-31 15:32:37,568 39301 INFO goneflying3 odoo.modules.loading: 65 modules loaded in 0.42s, 0 queries (+0 extra)
2025-05-31 15:32:37,661 39301 ERROR goneflying3 odoo.modules.loading: Some modules are not loaded, some dependencies or manifest may be missing: ['theme_default', 'website', 'website_blog', 'website_event', 'website_mail', 'website_partner', 'website_payment', 'website_profile', 'website_project', 'website_slides', 'website_sms']
2025-05-31 15:32:37,662 39301 INFO goneflying3 odoo.modules.loading: Modules loaded.
2025-05-31 15:32:37,671 39301 INFO goneflying3 odoo.registry: Registry loaded in 0.556s
env: <odoo.orm.environments.Environment object at 0x73f51d66b560>


you should try to stop your Odoo server, and run
python /path/to/odoo-bin --config=/path/to/odoo.conf -d name_of_your_database -u all
to make sure everything gets upgrade at once and in the correct sequence (make sure you use the correct python env).
It's likely however that this isn't working because i doubt your issue is with the fact that you've dumped and re-imported your database, but that you've deleted some crucial template elements while modifying your website which could lead to this behavior as well.

Autor

Hi Chris, thank you so much for your reply.

I used the shell commandline to install module html_builder and viola, the website started working again (thank goodness).

However, now when I attempt to install/active a module for example eCommerce (which was activated before I backed up the database previously), I receive the following RPC error:

Odoo Server Error

RPC_ERROR

Odoo Server Error

Occured on goneflying.au on model ir.module.module and id 45 on 2025-05-31 15:54:48 GMT

Traceback (most recent call last):
  File "/opt/odoo/odoo/odoo/http.py", line 2047, in _transactioning
    return service_model.retrying(func, env=self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/service/model.py", line 176, in retrying
    result = func()
             ^^^^^^
  File "/opt/odoo/odoo/odoo/http.py", line 2014, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/http.py", line 2276, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_http.py", line 354, in _dispatch
    result = endpoint(**request.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/http.py", line 761, in route_wrapper
    result = endpoint(self, *args, **params_ok)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/addons/web/controllers/dataset.py", line 38, in call_button
    action = call_kw(request.env[model], method, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/service/model.py", line 84, in call_kw
    result = method(recs, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo-venv/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_module.py", line 67, in check_and_log
    return method(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_module.py", line 449, in button_immediate_install
    return self._button_immediate_function(self.env.registry[self._name].button_install)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_module.py", line 583, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo-venv/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/tools/func.py", line 89, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/registry.py", line 166, in new
    load_modules(
  File "/opt/odoo/odoo/odoo/modules/loading.py", line 450, in load_modules
    load_module_graph(
  File "/opt/odoo/odoo/odoo/modules/loading.py", line 245, in load_module_graph
    getattr(py_module, post_init)(env)
  File "/opt/odoo/odoo/addons/sale/__init__.py", line 14, in _post_init_hook
    _synchronize_crons(env)
  File "/opt/odoo/odoo/addons/sale/__init__.py", line 21, in _synchronize_crons
    cron.active = str2bool(env['ir.config_parameter'].get_param(param, 'False'))
    ^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/fields.py", line 1731, in __set__
    records.write({self.name: write_value})
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_cron.py", line 637, in write
    return super().write(vals)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/addons/mail/models/mail_thread.py", line 372, in write
    self._track_prepare(self._fields)
  File "/opt/odoo/odoo/addons/mail/models/mail_thread.py", line 546, in _track_prepare
    values.setdefault(fname, record[fname])
                             ~~~~~~^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/models.py", line 6477, in __getitem__
    return self._fields[key].__get__(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/fields.py", line 1635, in __get__
    self.compute_value(recs)
  File "/opt/odoo/odoo/odoo/orm/fields.py", line 1798, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/odoo/addons/mail/models/mail_thread.py", line 468, in _compute_field_value
    return super()._compute_field_value(field)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/models.py", line 4628, in _compute_field_value
    determine(field.compute, self)
  File "/opt/odoo/odoo/odoo/orm/fields.py", line 79, in determine
    return needle(records, *args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/fields.py", line 706, in _compute_related
    record[self.name] = self._process_related(value[self.related_field.name], record.env)
                                              ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/models.py", line 6477, in __getitem__
    return self._fields[key].__get__(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/fields.py", line 1597, in __get__
    recs._fetch_field(self)
  File "/opt/odoo/odoo/odoo/orm/models.py", line 3460, in _fetch_field
    self.fetch(fnames)
  File "/opt/odoo/odoo/odoo/orm/models.py", line 3498, in fetch
    fetched = self._fetch_query(query, fields_to_fetch)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/models.py", line 3587, in _fetch_query
    rows = self.env.execute_query(query.select(*sql_terms))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/environments.py", line 506, in execute_query
    self.cr.execute(query)
  File "/opt/odoo/odoo/odoo/sql_db.py", line 422, in execute
    self._obj.execute(query, params)
psycopg2.errors.UndefinedColumn: column ir_act_server.sequence_id does not exist
LINE 1: ...."evaluation_type", "ir_act_server"."html_value", "ir_act_se...
                                                             ^
HINT:  Perhaps you meant to reference the column "ir_act_server.sequence".


The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (https://goneflying.au/web/assets/4ad5e37/web.assets_web.min.js:3090:163)
        at XMLHttpRequest.<anonymous> (https://goneflying.au/web/assets/4ad5e37/web.assets_web.min.js:3096:13)

Close

Autor Mejor respuesta

UPDATE - Solved!

SOLUTION


Thank you so much to all that have assisted me with this issue.  


Even though my backup.zip manifest said that the backup file was generated using Odoo v18.4a1, and trying this version to restore to, it didn't work. 


How did I resolve the issue?


I cloned the following git branch, and installed Odoo via this:

git clone https://github.com/odoo/odoo --depth 1 --branch saas-18.3 --single-branch


This installed version saas-18.3

Then I restored my database backup via the /web/database/manager URL


It restored with issues (yellow triangle was shown next to the database in the database selector), although it still allowed me to login. 


Next step was to activate the venv (virtual python environment) for my odoo installation and run the following repair command:

python3 odoo-bin --config=/etc/odoo.conf -d mydatabasenamehere -u all


This took a little time, but went through each of my modules, views etc and upgraded them all as was explained by you amazingly awesome people on this thread.


Now everything is perfect.


Thank you so so much for all your kind assistance!





Thank you so so much Jose!  All this information has been extremely helpful.

I only need to combat one more thing now, and its this.  (its invoked by trying to add a new customer, but then it occurs all over the place) I get this error:

Odoo Client Error

UncaughtPromiseError > EvalError

Uncaught Promise > Can not evaluate python expression: (bool(not is_coa_installed)) Error: Name 'is_coa_installed' is not defined

Occured on goneflying.au on 2025-05-31 16:27:27 GMT

EvalError: Can not evaluate python expression: (bool(not is_coa_installed))
    Error: Name 'is_coa_installed' is not defined
    EvalError: Can not evaluate python expression: (bool(not is_coa_installed))
    Error: Name 'is_coa_installed' is not defined
        at evaluateExpr (https://goneflying.au/web/assets/86e541a/web.assets_web.min.js:3298:54)
        at evaluateBooleanExpr (https://goneflying.au/web/assets/86e541a/web.assets_web.min.js:3301:8)
        at Proxy._isInvisible (https://goneflying.au/web/assets/86e541a/web.assets_web.min.js:6202:97)
        at Proxy._checkValidity (https://goneflying.au/web/assets/86e541a/web.assets_web.min.js:6161:197)
        at Proxy._applyChanges (https://goneflying.au/web/assets/86e541a/web.assets_web.min.js:6157:177)
        at Proxy._update (https://goneflying.au/web/assets/86e541a/web.assets_web.min.js:6272:24)
        at async https://goneflying.au/web/assets/86e541a/web.assets_web.min.js:6151:40

Close

Avatar
Descartar
Mejor respuesta

Hi Anthony, this happens when an inherited view can't find the element its trying to position itself against (i.e. xpath). Essentially, this is an outcome from a view trying to inherit another and failing. 

What I would do if I was in your position (after having verified your Odoo/Enterprise repositories are exactly the same, version, etc.), are one of two things: 

  1. Try running Odoo manually (not the service) with the upgrade base flag to update all of the views and make sure all view are up to the latest (I just hope you did not hardcode some elements into standard Odoo templates yourself, because they will be wiped if you did. If you created views via Studio, custom module or the Editor they should persist). 
    1. To manually run Odoo, you need to stop the Odoo service sudo service odoo stop
    2. /home/odoo/src/odoo/odoo-bin --addons-path=/home/odoo/src/enterprise,/home/odoo/src/odoo/addons,/home/odoo/src/custom_modules --db-filter=mydb -d mydb -u base​ 
      1. You need to alter this command to fit your installation, where mydb​ is the database, specifying the location of the odoo-bin, etc. 
      2. the addons path must be where your enterprise repo is located (if applicable), the addons directory for your odoo repo and if you have any custom modules have that be last.
    3. It will take sometime since it is upgrading all the modules starting with the base module. 
    4. If it still does not work after this, try the second option
  2. Deactivate the offending view via the database. Temporarily disable the view using postgresql.
    1. Query the datbase
      1. psql mydb
    2. First find the associated theme view that is creating this issue. We probably will find it easiest via external identifiers 
      1. select res_id, model, name from ir_model_data where name = 'template_web_login_layout_186';
      2. It should give you an id (integer) a model (dot separated strings) if found. We will use these in the next query
    3. Deactivate the view
      1. update theme_ir_ui_view set active = 'f' where id = 318;
      2.  Where 318 is the assumed view id you got in the previous query and theme_ir_ui_view​ is the converted dot separated string to be compatible with the table names in Odoo (e.g. theme.ir.ui.view)​. Basically just replace the dots with underscores. 
    4. Restart Odoo again and try again
      1. sudo service odoo restart

Hope this helps. 

Jose M. Coronado

GFP Solutions


Avatar
Descartar