Skip to content

Instantly share code, notes, and snippets.

@360org
360org / keyconcept theme error
Created April 30, 2018 17:37
keyconcept theme error raise IOError('File not found: %s' % basename) OSError: File not found: platform_theme/views/theme_source.xml
Error:
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
@360org
360org / Install Postgres and first login DB
Created March 13, 2018 06:25
Install Postgres and first login DB
Setting a password for the postgres user
On Linux systems, there is no default password set.
To set the default password:
Run the psql command from the postgres user account:
sudo -u postgres psql postgres
Set the password:
@360org
360org / W360S Core Fixed
Created December 27, 2017 09:48
W360S Core Fixed
IMPORTANT:
-----------------------------------------------------------------------------------------
Please be sure to read the Important Update Notes before you update:
http://theme-fusion.com/avada-doc/install-update/important-update-information/
We are always proactive in preventing security issues, however nobody can assume they will never come up.
This is why we highly recommend to stay up to date with each new theme version and plugins.
-----------------------------------------------------------------------------------------
Version 5.4 - December 19th, 2017
it is not that simple, Odoo code still depends on the old unmaintained python-pypdf
However, there is an easy workaround : create a fake python-pdf package and install python-pyPdf from Pipy (Python repository). All of this will be done as root :
install equivs to create fake packages and python-pipto install package from Python repository
run equivs-control python-pypdf, this will create and populate the file python-pypdf
edit the file like below (dot and space under "Description" are mandatory) :
Section: python
Package: python-pypdf
Version: 1.13
@360org
360org / fixd odoo invalid database name
Created September 26, 2017 13:48
fixd odoo invalid database name
cd path/to/odoo
sed -i 's/matches="[^"]*"//g' addons/web/static/src/xml/base.xml
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 677, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 333, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 326, in checked_call
cd /usr/local/src/
curl https://curl.haxx.se/download/curl-7.51.0.tar.gz | tar xvz
# wget http://www.openssl.org/source/openssl-1.0.2.tar.gz
# tar -xzvf openssl-1.0.2k.tar.gz
cd curl-7.51.0
./configure --with-openssl=/usr/local/src/openssl-1.0.2 && make && make install
curl -V
@360org
360org / recompile-nginx-on-CentOS-to-support-HTTP-2
Created February 13, 2017 17:34
recompile-nginx-on-CentOS-to-support-HTTP-2
# recompile-nginx-on-CentOS-to-support-HTTP-2
In CentOS command line, or an SSH terminal and enter the following command (note the uppercase letter V):
nginx -V
nginx version: nginx/1.10.3
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-file-aio --with-threads --with-ipv6 --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-ht
@360org
360org / find command
Created February 13, 2017 08:53
find / -xdev 2>/dev/null -name "website_templates.xml"
find / -xdev 2>/dev/null -name "website_templates.xml"
@360org
360org / Chown File Permission
Created August 22, 2016 07:59
Chown File Permission
chmod Wordpress
find . -type d -exec chmod 755 '{}' \;
find . -type f -exec chmod 644 '{}' \;