Odoo - Run Server & Posbox in same raspberry - raspberry-pi

I have installed the Odoo, stable v.11. The software is working fine.
Now I would like to install and configure PosBox in the same machine. For this I used the official guide:
https://www.odoo.com/documentation/user/10.0/point_of_sale/overview/setup.html#id2
Apparently the installation was fine.
But when I run this command:
odoo --load=web,hw_proxy,hw_posbox_homepage,hw_posbox_upgrade,hw_scale,hw_scanner,hw_escpos
It display this errors in the logfile:
2018-08-14 15:36:51,051 1004 INFO ? odoo: Odoo version 11.0-20180814
2018-08-14 15:36:51,055 1004 INFO ? odoo: addons paths: ['/home/pi/.local/share/Odoo/addons/11.0', '/usr/lib/python3/dist-packages/odoo/addons']
2018-08-14 15:36:51,057 1004 INFO ? odoo: database: default#default:default
fatal: Not a git repository: '/home/pi/odoo/.git'
2018-08-14 15:36:51,144 1004 CRITICAL ? odoo.modules.module: Couldn't load module hw_posbox_upgrade
2018-08-14 15:36:51,145 1004 CRITICAL ? odoo.modules.module: Command 'git --work-tree=/home/pi/odoo/ --git-dir=/home/pi/odoo/.git log -1' returned non-zero exit status 128
2018-08-14 15:36:51,146 1004 ERROR ? odoo.service.server: Failed to load server-wide module `hw_posbox_upgrade`.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 866, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 4, in <module>
File "/usr/lib/python3/dist-packages/odoo/addons/hw_posbox_upgrade/controllers/__init__.py", line 4, in <module>
from . import main
File "/usr/lib/python3/dist-packages/odoo/addons/hw_posbox_upgrade/controllers/main.py", line 83, in <module>
upgrade_template += subprocess.check_output("git --work-tree=/home/pi/odoo/ --git-dir=/home/pi/odoo/.git log -1", shell=True).decode('utf-8').replace("\n", "<br/>")
File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'git --work-tree=/home/pi/odoo/ --git-dir=/home/pi/odoo/.git log -1' returned non-zero exit status 128
2018-08-14 15:36:51,182 1004 ERROR ? odoo.addons.hw_scanner.controllers.main: Odoo module hw_scanner depends on the evdev python module
2018-08-14 15:36:51,199 1004 CRITICAL ? odoo.modules.module: Couldn't load module hw_escpos
2018-08-14 15:36:51,199 1004 CRITICAL ? odoo.modules.module: No module named 'netifaces'
2018-08-14 15:36:51,200 1004 ERROR ? odoo.service.server: Failed to load server-wide module `hw_escpos`.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 866, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 4, in <module>
File "/usr/lib/python3/dist-packages/odoo/addons/hw_escpos/controllers/__init__.py", line 4, in <module>
from . import main
File "/usr/lib/python3/dist-packages/odoo/addons/hw_escpos/controllers/main.py", line 11, in <module>
import netifaces as ni
ImportError: No module named 'netifaces'
2018-08-14 15:36:51,215 1004 INFO ? odoo.service.server: HTTP service (werkzeug) running on webserver-pi:8069
2018-08-14 15:36:51,750 1004 INFO ? odoo.addons.base.ir.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
2018-08-14 15:36:52,203 1004 WARNING ? odoo.addons.base.res.res_currency: The num2words python library is not installed, l10n_mx_edi features won't be fully available.
2018-08-14 15:36:54,795 1004 INFO ? odoo.addons.sms.wizard.send_sms: The `phonenumbers` Python module is not available. Phone number validation will be skipped. Try `pip3 install phonenumbers` to install it.
2018-08-14 15:36:55,730 1004 INFO ? odoo.http: HTTP Configuring static files
2018-08-14 15:36:55,748 1004 INFO ? odoo.sql_db: Connection to the database failed
2018-08-14 15:36:55,758 1004 INFO ? werkzeug: 192.168.0.4 - - [14/Aug/2018 15:36:55] "GET /hw_proxy/status HTTP/1.1" 500 -
2018-08-14 15:36:55,779 1004 ERROR ? werkzeug: Error on request:
I have seen CRITICAL and ERRORS about the modules of the POSBOX but the modules exist in the addons directory.
I'm not sure of the problem I have revised the odoo.conf and the path of the addons it's fine too.
Please Could you help me?

I had two problems:
1) The Git repository was in wrong directory. It has moved to /home/username/.git
2) I have created a user & database in Postgres to run with the same user that run odoo process.
Thanks!

Related

Odoo 14 Installation : Connection to the database failed and no password supplied

I am trying to install the openERP Odoo 14 on macOS Catalina version 10.15.7. I have installed python3, postgreSQL, pgAdmin4 just as demanded and cloned odoo 14 from here but when I type this command python3 odoo-bin -d odoo14 which should create the database, it didn't work whereas it gives this error saying Connection to the database failed and no password supplied:
2021-04-15 11:46:20,236 79206 INFO ? odoo: Odoo version 14.0
2021-04-15 11:46:20,236 79206 INFO ? odoo: addons paths: ['/Users/mac/Desktop/odoo/odoo/odoo/addons', '/Users/mac/Library/Application Support/Odoo/addons/14.0', '/Users/mac/Desktop/odoo/odoo/addons']
2021-04-15 11:46:20,237 79206 INFO ? odoo: database: default#default:default
2021-04-15 11:46:20,262 79206 INFO ? odoo.sql_db: Connection to the database failed
Traceback (most recent call last):
File "odoo-bin", line 8, in <module>
odoo.cli.main()
File "/Users/mac/Desktop/odoo/odoo/odoo/cli/command.py", line 61, in main
o.run(args)
File "/Users/mac/Desktop/odoo/odoo/odoo/cli/server.py", line 178, in run
main(args)
File "/Users/mac/Desktop/odoo/odoo/odoo/cli/server.py", line 142, in main
odoo.service.db._create_empty_database(db_name)
File "/Users/mac/Desktop/odoo/odoo/odoo/service/db.py", line 99, in _create_empty_database
with closing(db.cursor()) as cr:
File "/Users/mac/Desktop/odoo/odoo/odoo/sql_db.py", line 675, in cursor
return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
File "/Users/mac/Desktop/odoo/odoo/odoo/sql_db.py", line 248, in __init__
self._cnx = pool.borrow(dsn)
File "/Users/mac/Desktop/odoo/odoo/odoo/sql_db.py", line 558, in _locked
return fun(self, *args, **kwargs)
File "/Users/mac/Desktop/odoo/odoo/odoo/sql_db.py", line 626, in borrow
**connection_info)
File "/Users/mac/opt/miniconda3/lib/python3.7/site-packages/psycopg2/__init__.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: fe_sendauth: no password supplied
I am using python3 of the system not a virtual environment.
Could anyone please help me figure out what's wrong and get Odoo 14 working?
Thanks in advance.
When you first install PostgreSQL on MacOS with brew it creates a db user
with the same name as your MacOS user with no password.
Can you try launching with these flags?
python3 odoo-bin -d odoo14 --db_user=yourusername --db_password=False

PySpark not starting - Windows 10

I am trying to setup Spark for Python - on a windows 10 pro machine.
However, after following these steps:
Installed Anaconda with Python 3.7
Installed JDK 8
Installed pre-built Spark 2.4.6 with hadoop 2.7
Downloaded winutils.exe
Setup all environment variables - also the user path setup
Created a C:\tmp\hive folder
Used the winutils.exe chmod -R 777 C:\tmp\hive command successfully
When I try and launch pyspark via command prompt the following text is output and nothing happense thereafter - also no errors?
(base) C:\Spark\bin>pyspark
Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information.
20/08/03 07:49:58 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Setting default log level to "WARN". To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
FINALLY 1 + hour later this error is printed:
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Spark\python\pyspark\shell.py", line 41, in <module>
spark = SparkSession._create_shell_session()
File "C:\Spark\python\pyspark\sql\session.py", line 573, in _create_shell_session
return SparkSession.builder\
File "C:\Spark\python\pyspark\sql\session.py", line 173, in getOrCreate
sc = SparkContext.getOrCreate(sparkConf)
File "C:\Spark\python\pyspark\context.py", line 367, in getOrCreate
SparkContext(conf=conf or SparkConf())
File "C:\Spark\python\pyspark\context.py", line 136, in __init__
conf, jsc, profiler_cls)
File "C:\Spark\python\pyspark\context.py", line 198, in _do_init
self._jsc = jsc or self._initialize_context(self._conf._jconf)
File "C:\Spark\python\pyspark\context.py", line 306, in _initialize_context
return self._jvm.JavaSparkContext(jconf)
File "C:\Spark\python\lib\py4j-0.10.7-src.zip\py4j\java_gateway.py", line 1523, in __call__
File "C:\Spark\python\lib\py4j-0.10.7-src.zip\py4j\java_gateway.py", line 985, in send_command
File "C:\Spark\python\lib\py4j-0.10.7-src.zip\py4j\java_gateway.py", line 1152, in send_command
File "C:\Program Files\Python37\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)

odoo.service.server: Failed to load server-wide module `web`

I am getting this error during starting the server after installation of odoo 11.
I am using ubuntu 18.04
my config file is like this
*
[options]
; This is the password that allows database operations:
;admin_passwd = admin
db_host = 127.0.0.1
db_port = 8069
db_user = odoo
db_password = 123
addons_path = /opt/odoo/addons,/opt/odoo/odoo/addons
logfile = /var/log/odoo/odoo-server.log
*
Full error is something like this
2020-02-07 05:12:33,809 12706 CRITICAL ? odoo.modules.module: Couldn't load module web
2020-02-07 05:12:33,809 12706 CRITICAL ? odoo.modules.module: The 'odoo.addons.web' package was not installed in a way that PackageLoader understands.
2020-02-07 05:12:33,809 12706 ERROR ? odoo.service.server: Failed to load server-wide module `web`.
The `web` module is provided by the addons found in the `openerp-web` project.
Maybe you forgot to add those addons in your addons_path configuration.
Traceback (most recent call last):
File "/opt/odoo/odoo/service/server.py", line 984, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/opt/odoo/odoo/modules/module.py", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/opt/odoo/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 4, in <module>
File "/opt/odoo/addons/web/controllers/__init__.py", line 4, in <module>
from . import main, pivot
File "/opt/odoo/addons/web/controllers/main.py", line 56, in <module>
loader = jinja2.PackageLoader('odoo.addons.web', "views")
File "/home/sandip/.local/lib/python3.6/site-packages/jinja2/loaders.py", line 290, in __init__
" PackageLoader understands." % package_name
ValueError: The 'odoo.addons.web' package was not installed in a way that PackageLoader understands.
It's actually a bug inside Jinja2. Update it to version 2.11.2
You might be blocked by a missing parameter in your config file.
Try to add the following parameter in the file:
server_wide_modules = web
It is a requirement for the installation to go through peacefully.
Hope it helps
Please check your jinja version
maybe wrong with your version jinja
uninstall them
sudo pip3 uninstall Jinja2
then install with right version
sudo pip3 install Jinja2==2.10.1

Openerp 7.0 server not getting started

I have downloaded fresh copy of the 7.0 branch of odoo from the github, I have changed all the necessary things like user, password, port and I tried to start the server but getting this error,
2015-03-12 06:47:50,735 7260 CRITICAL ? openerp.modules.module: Couldn't load module web
2015-03-12 06:47:50,736 7260 CRITICAL ? openerp.modules.module: cannot import name models
2015-03-12 06:47:50,736 7260 ERROR ? openerp.service: Failed to load server-wide module `web`.
The `web` module is provided by the addons found in the `openerp-web` project.
Maybe you forgot to add those addons in your addons_path configuration.
Traceback (most recent call last):
File "/home/viraj/workspace/v7_development/odoo_v7/openerp/service/__init__.py", line 60, in load_server_wide_modules
openerp.modules.module.load_openerp_module(m)
File "/home/viraj/workspace/v7_development/odoo_v7/openerp/modules/module.py", line 415, in load_openerp_module
getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
File "/home/viraj/workspace/v7_development/odoo_v7/addons/web/http.py", line 628, in wsgi_postload
openerp.wsgi.register_wsgi_handler(Root())
File "/home/viraj/workspace/v7_development/odoo_v7/addons/web/http.py", line 517, in __init__
self.load_addons()
File "/home/viraj/workspace/v7_development/odoo_v7/addons/web/http.py", line 580, in load_addons
m = __import__('openerp.addons.' + module)
File "/home/viraj/workspace/v7_development/odoo_v7/openerp/modules/module.py", line 133, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/home/viraj/workspace/v7_development/emipro_addons/quotation_split/__init__.py", line 1, in <module>
import py
File "/home/viraj/workspace/v7_development/emipro_addons/quotation_split/py/__init__.py", line 1, in <module>
import sale_order
File "/home/viraj/workspace/v7_development/emipro_addons/quotation_split/py/sale_order.py", line 1, in <module>
from openerp import models, fields, api, _
ImportError: cannot import name models
If anyone know this please help me.
Thanks in advance.

Issues with MongoDB Connector for Solr

I am trying to use the MongoDB connector with MongoDB and Solr for search purposes. I know MongoDB is working properly. I also have Solr up and running. I have added the LukeRequestHandler to the solrconfig.xml file. The issue I am having is when I run the command to start the MongoDB Connector I receive the following error:
pysolr.SolrError: [Reason: /solr/admin/luke]
Any help would e greatly appreciated. Thank you in advance.
/usr/lib/python2.6/site-packages/mongo_connector/doc_managers/solr_doc_manager.py
2014-06-22 09:16:10,404 - INFO - Beginning Mongo Connector
2014-06-22 09:16:10,461 - INFO - Starting new HTTP connection (1): localhost
2014-06-22 09:16:10,464 - INFO - Finished
'http://localhost:8080/solr/admin/luke?show=schema&wt=json' (get) with body '' in 0.010 seconds.
2014-06-22 09:16:10,468 - ERROR - [Reason: /solr/admin/luke]
Traceback (most recent call last):
File "/usr/bin/mongo-connector", line 9, in <module>
load_entry_point('mongo-connector==1.2.1-', 'console_scripts', 'mongo-connector')()
File "/usr/lib/python2.6/site-packages/mongo_connector-1.2.1_-py2.6.egg/mongo_connector/connector.py", line 720, in main
continue_on_error=options.continue_on_error
File "/usr/lib/python2.6/site-packages/mongo_connector-1.2.1_-py2.6.egg/mongo_connector/connector.py", line 154, in __init__
**docman_kwargs))
File "/usr/lib/python2.6/site-packages/mongo_connector/doc_managers/solr_doc_manager.py", line 57, in __init__
self._build_fields()
File "/usr/lib/python2.6/site-packages/mongo_connector/doc_managers/solr_doc_manager.py", line 71, in _build_fields
declared_fields = self.solr._send_request('get', ADMIN_URL)
File "/usr/lib/python2.6/site-packages/pysolr.py", line 321, in _send_request
raise SolrError(error_message)
pysolr.SolrError: [Reason: /solr/admin/luke]