Odoo 12 : Changes are not visible when updating existing module - odoo

I am trying to update some static text in template name ajax_login_template.xml inside website_ajax_login module.
I have restored an existing dump file without any errors.
The issue is that I can't see the changes after updating the app in developer mood.
But the changes get visible as expected when I use a new database instead of the dumped version and fresh install website_ajax_login_module. To simplify my question and what I did as follows:
First Attempt
Step 1 -> Restore dump file into a database.
Step 2 -> Update template.xml file
Step 3 -> Activate Developer Mood and upgrade the App. i.e. `website_ajax_login`
Result ===> Changes Not Visible.
Also if I click on top menu item "Customize -> HTML/CSS editor". No windows open at the right side of the screen.
Second Attempt
Step 1: Go to web database manager view
Step 2: Create a database (not restore list in the first attempt)
Step 3: Install website_ajax_login app
Result ====> Changes Visible I made in the template.xml file.
if I click on top menu item "Customize -> HTML/CSS editor". The window opens on the right side of the screen without any problem.
Is there some cache etc involved in this error. When using the dumped version of my database, I see the error logs as follows.
2020-05-18 10:58:57,541 127210 INFO archixpress odoo.addons.base.models.ir_attachment: _read_file reading /home/shahzeb/.local/share/Odoo/filestore/archixpress/bd/bdbf3e6ea7597eb4b2305c7e8e083430facaa1b2
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 38054
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/fields.py", line 976, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/odoo/api.py", line 1041, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('ir.attachment(38054,).datas', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/shahzeb/Projects/Wiztech/odoo/odoo/odoo/addons/base/models/ir_attachment.py", line 113, in _file_read
r = base64.b64encode(open(full_path,'rb').read())
FileNotFoundError: [Errno 2] No such file or directory: '/home/shahzeb/.local/share/Odoo/filestore/archixpress/bd/bdbf3e6ea7597eb4b2305c7e8e083430facaa1b2'
2020-05-18 10:58:57,561 127210 INFO archixpress werkzeug: 127.0.0.1 - - [18/May/2020 10:58:57] "GET /web/image/38054/160x160/ HTTP/1.1" 304 - 5 0.009 0.041
2020-05-18 10:58:57,575 127210 INFO archixpress odoo.addons.base.models.ir_attachment: _read_file reading /home/shahzeb/.local/share/Odoo/filestore/archixpress/26/269f4b4e91c4bc57d9d535ad3c8fcd907d975031
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 38056
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/fields.py", line 976, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/odoo/api.py", line 1041, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('ir.attachment(38056,).datas', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/shahzeb/Projects/Wiztech/odoo/odoo/odoo/addons/base/models/ir_attachment.py", line 113, in _file_read
r = base64.b64encode(open(full_path,'rb').read())
FileNotFoundError: [Errno 2] No such file or directory: '/home/shahzeb/.local/share/Odoo/filestore/archixpress/26/269f4b4e91c4bc57d9d535ad3c8fcd907d975031'
2020-05-18 10:58:57,578 127210 INFO archixpress werkzeug: 127.0.0.1 - - [18/May/2020 10:58:57] "GET /web/image/38056/160x160/ HTTP/1.1" 304 - 5 0.009 0.041
2020-05-18 10:58:58,001 127210 INFO archixpress werkzeug: 127.0.0.1 - - [18/May/2020 10:58:58] "POST /web/dataset/call HTTP/1.1" 200 - 3 0.051 0.032
2020-05-18 10:58:58,079 127210 INFO archixpress werkzeug: 127.0.0.1 - - [18/May/2020 10:58:58] "POST /website/translations HTTP/1.1" 200 - 12 0.116 0.142
2020-05-18 10:58:58,095 127210 INFO archixpress odoo.addons.base.models.ir_attachment: _read_file reading /home/shahzeb/.local/share/Odoo/filestore/archixpress/cd/cd5a21b5fca4934040122813fb0d1214003f6ca7
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 38113
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/fields.py", line 976, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/odoo/api.py", line 1041, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('ir.attachment(38113,).datas', None)
During handling of the above exception, another exception occurred:
As a test, I Created a new module and every thing works fine with new module.

Had a similar problem because someone had altered the view using debug tools inside Odoo. The solution can be found on this question: https://stackoverflow.com/a/43650510

Related

Odoo filestore missing

I want to set up a new Odoo development instance in a docker container with data from the live instance (running outside of docker).
To copy the database inside the docker container I followed these steps:
sudo docker cp dump.sql db_docker_name:/dump.sql
sudo docker exec -it --user postgres db_docker_name /bin/bash
psql database_name < dump.sql
ALTER DATABASE database_name OWNER TO odoo;
sudo docker exec docker_name pip3 install xmlschema # and all the other requirements
I get the error:
2022-10-17 08:10:29,024 1 INFO dblive odoo.addons.base.models.ir_attachment: _read_file reading /var/lib/odoo/filestore/dblive/6a/6ad87633490735f27b4f73d8d984193d8d7d6947
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 789, in get
field_cache = field_cache[record.env.cache_key(field)]
KeyError: (None, None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 970, in __get__
value = env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 793, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'ir.attachment(52,).datas'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 789, in get
field_cache = field_cache[record.env.cache_key(field)]
KeyError: (None,)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 970, in __get__
value = env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 793, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'ir.attachment(52,).raw'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 102, in _file_read
with open(full_path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/odoo/filestore/dblive/6a/6ad87633490735f27b4f73d8d984193d8d7d6947'
Inside the container I have these files:
odoo#95198003ea0a:~/filestore/dblive$ ls
16 18 86 checklist d0 e7 fa
How can I solve this?
Thank you
Solved it by copying the original filestore into the new one.
docker cp filestore/. dev_odoo_1:/var/lib/odoo/filestore/dblive

Is there a way to restore odoo installation with out uninstall?

I don't want to have to reinstall everything. I have an error on the server where odoo does not run. It is a database (xml) which gives me the error. So I want to restart everything. Is it possible to do it without entering web / database / manager?
I would like to have a clean installation without having to purge everything and install again.
Edit
I have a community odoo installation on a local development server with debian installed.
I have no problem deleting everything and starting over, but I don't want to do the whole installation process all over again.
This is the error I am getting with his command:
odoo -p 8070 -dev=reload,xml -i base
2022-01-06 13:23:42,561 13626 ERROR xml odoo.modules.loading: Database xml not initialized, you can force it with -i base
2022-01-06 13:23:42,575 13626 ERROR ev=reload odoo.modules.loading: Database xml not initialized, you can force it with `-i base`
2022-01-06 13:23:42,582 13626 INFO xml werkzeug: 127.0.0.1 - - [06/Jan/2022 13:23:42] "GET / HTTP/1.1" 500 - 6 0.006 3.747
2022-01-06 13:23:42,588 13626 ERROR xml werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/werkzeug/serving.py", line 306, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.9/dist-packages/werkzeug/serving.py", line 294, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 441, in app
return self.app(e, s)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 113, in application
return application_unproxied(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 88, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1306, in __call__
return self.dispatch(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1272, in __call__
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.9/dist-packages/werkzeug/middleware/shared_data.py", line 220, in __call__
return self.app(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1463, in dispatch
ir_http = request.registry['ir.http']
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 176, in __getitem__
return self.models[model_name]
KeyError: 'ir.http' - - -
2022-01-06 13:24:42,606 13626 ERROR xml odoo.sql_db: bad query: SELECT latest_version FROM ir_module_module WHERE name='base'
ERROR: relation "ir_module_module" does not exist
LINE 1: SELECT latest_version FROM ir_module_module WHERE name='base...
^
2022-01-06 13:24:42,607 13626 WARNING ? odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database xml.
2022-01-06 13:24:43,639 13626 ERROR xml odoo.sql_db: bad query: SELECT latest_version FROM ir_module_module WHERE name='base'
ERROR: relation "ir_module_module" does not exist
LINE 1: SELECT latest_version FROM ir_module_module WHERE name='base...

Google-cloud-sdk install failing with in invalid syntax

/home/sohail//google-cloud-sdk/install.sh
Welcome to the Google Cloud SDK!
Traceback (most recent call last):
File "/home/sohail//google-cloud-sdk/bin/bootstrapping/install.py", line 27, in
from googlecloudsdk import gcloud_main
File "/home/sohail//google-cloud-sdk/lib/googlecloudsdk/gcloud_main.py", line 37, in
from googlecloudsdk.command_lib.util.apis import yaml_command_translator
File "/home/sohail//google-cloud-sdk/lib/googlecloudsdk/command_lib/util/apis/yaml_command_translator.py", line 241
if self.spec.async:
^
SyntaxError: invalid syntax
Script execution failed!
Exiting with status 1.

Why does cherrypy say that port isn't free even it is unused port?

Even though I configure a unused port the engine starts and then gives an error saying that it is not free. sometimes-the port is occupied by process python, sometimes it is still open when I check the status after debugging. please let me know what am I doing wrong
This is my salt-api file. rest_cherrypy:
port: 28160
host: 10.0.13.122
webhook_disable_auth: True
webhook_url: /hook
ssl_crt: /etc/ssl/private/cert.pem
ssl_key: /etc/ssl/private/key.pem
salt-api l debug gives the error:
ChannelFailures: IOError("Port 28160 not free on '10.0.13.122'",)
Here's the debugging o/p
Reading configuration from /etc/salt/master
[INFO ] [24/Nov/2016:12:15:11] ENGINE Started
monitorthread'_TimeoutMonitor'.
[ERROR ] [24/Nov/2016:12:15:16] ENGINE Error in 'start' listener
method Server.start of >
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/cherrypy/process/wspbus.py", line 197,
in publish
output.append(listener(*args, **kwargs))
File "/usr/lib/python2.7/dist-packages/cherrypy/_cpserver.py", line 151, in
start
ServerAdapter.start(self)
File "/usr/lib/python2.7/dist-packages/cherrypy/process/servers.py", line
167, in start
wait_for_free_port(*self.bind_addr)
File "/usr/lib/python2.7/dist-packages/cherrypy/process/servers.py", line
410, in wait_for_free_port
raise IOError("Port %r not free on %r" % (port, host))
IOError: Port 28160 not free on '10.0.13.122'
[ERROR ] [24/Nov/2016:12:15:16] ENGINE Shutting down due to error in start
listener:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/cherrypy/process/wspbus.py", line
235, in start
self.publish('start')
File "/usr/lib/python2.7/dist-packages/cherrypy/process/wspbus.py", line
215, in publish
raise exc
ChannelFailures: IOError("Port 28160 not free on '10.0.13.122'",)

Kivy - OSError, Still Apps Run Successfully?

Every time I run a Kivy app I see OSError (see it in last line of my given example). Even though my app runs successfully. What could be the cause of this error?
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/dist-packages/kivy/input/providers/mtdev.py", line 197, in _thread_run
_device = Device(_fn)
File "/usr/lib/python2.7/dist-packages/kivy/lib/mtdev.py", line 131, in __init__
self._fd = os.open(filename, os.O_NONBLOCK | os.O_RDONLY)
OSError: [Errno 13] Permission denied: '/dev/input/event5'
This error is not important, it just means that kivy checked the possible input providers in your OS and found that this one is forbidden.