2
votes

I deployed odoo 10 CE on my local Ubuntu server 16.04 LTS with nginx reverse proxy. Now i installed Ubuntu 16.04, Odoo 10 CE with nginx as reverse proxy on another server. I restored the database from old server to new server.

If i access my new server like http://x.x.x.x:8069 , it works fine.

But access like http://x.x.x.x , the login page shows with out css styling. After login can't see any menus, company logo only.

enter image description here

If i try with Private browsing it works fine.

How can i resolve this.

EDIT

I ran the odoo server in two ways, first ran directly from the terminal like :

` sudo su - odoo -s /bin/bash

/odoo/odoo-server/./odoo-bin`

then i access like <ip_address>:8069, it works fine.

But when i try to run as demon ( sudo /etc/init.d/odoo-server start) , i face the same problem.

My system user is: odooadmin

odoo user is : odoo

And if i access via debug mode with assets it woks fine.

 <ip_address>:8069/web?debug=assets

Any solution?

4
What do you mean Private browsing? - MaXi32
Incognito Window.. - KbiR
You said that if using private browsing, it works then there is something with the cache. When you clear the browser cache, you also need to restart the browser. Unless if you stated that private browsing also has problem, then there will be other answers for you. - MaXi32

4 Answers

3
votes

Sometimes you can get an Internal Server Error 500. In other cases you can get what you got. There are a few things you can try:

  1. Remove Browser Cache. You can press Shift + Ctrl + Supr. Or reload without cache with Ctrl + F5
  2. Remove Cookies. If you are using chrome or chromium you can delete the cookies stored for the domain you are using as you can see in the images:

cookies removal

  1. web.base.url Parameter. Activate deleloper mode. Go to Settings > Parameters > System Parameters and check that the parameter web.base.url is correctly set. This parameter is updated each time you log in with the Administrator user, the value of the url bar is assigned to the parameter. But if you can get it to work with the private mode I assume this is well assigned.
2
votes

Did you compile your CSS?

If it looks funnyou may need lessc CSS compiling (from https://www.odoo.com/documentation/8.0/setup/install.html )

We symlink node because some versions of debian/ubuntu don't agree on the bin name

Install Node

sudo apt install -y nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node

Compiling CSS

If you install less, odoo will automatically compile the CSS

sudo npm install -g less less-plugin-clean-css

Consider blowing away the file cache:

If the compilation had failed, sometimes you need to blow away the postgres cache, (thanks to sebalix for this tip):

You can run this SQL query in postgres to let Odoo rebuild its CSS+JS assets + reload icons via dbeaver:

DELETE FROM ir_attachment WHERE datas_fname SIMILAR TO '%.(js|css)';
DELETE FROM ir_attachment WHERE name='web_icon_data';

Then restart the server (assuming it was installed via ansible)

sudo service odoo restart

There's also files in ~/.local/share/Odoo/filestore you may want to temporarily move/rename

Check postgres version

Some versions of postgres are not supported, check psql --version and that you can download a backup of your database

Check odoo version

I've seen installs where odoo-bin --version returns 10 but the logs show odoo11 before every log line

1
votes

I think your browser has some files on cache. Can you try after delete cache files on your browser ?

1
votes

If you moved to another machine there might be issue with loading some assets cached at the level of odoo server, such as transpiled js code for instance.

In order to solve this issue, you should (after restoring the database) connect to your database and run the following command :

DELETE FROM ir_attachment WHERE url LIKE '/web/content/%';.

More information here : https://github.com/odoo/odoo/issues/13808