Skip to content

Instantly share code, notes, and snippets.

View lukebranch's full-sized avatar

Luke Branch lukebranch

View GitHub Profile
2014-10-04 04:43:35,131 13002 INFO ? openerp: OpenERP version 8.0
2014-10-04 04:43:35,131 13002 INFO ? openerp: addons paths: ['/opt/odoo/.local/share/Odoo/addons/8.0', u'/opt/odoo/odoo-server/addons', u'/opt/odoo/custom/addons', u'/opt/odoo/custom/aeroo_reports/report_aeroo', u'/opt/odoo/custom/aeroo_reports/report_aeroo_ooo', u'/opt/odoo/custom/aeroo_reports/report_aeroo_sample', u'/opt/odoo/custom/server-tools', u'/opt/odoo/custom/community-management', '/opt/odoo/odoo-server/openerp/addons']
2014-10-04 04:43:35,131 13002 INFO ? openerp: database hostname: localhost
2014-10-04 04:43:35,131 13002 INFO ? openerp: database port: 5432
2014-10-04 04:43:35,131 13002 INFO ? openerp: database user: odoo
2014-10-04 04:43:35,226 13002 INFO ? openerp.service.server: Evented Service (longpolling) running on 0.0.0.0:8072
2014-10-04 04:43:35,735 13002 INFO ? openerp.addons.report.models.report: Will use the Wkhtmltopdf binary at /usr/bin/wkhtmltopdf
2014-10-04 04:43:35,736 13002 INFO ? openerp.addons.bus.bus: Bus.loop l
@lukebranch
lukebranch / debug-2014-10-21-report_aeroo_ooo
Created October 21, 2014 06:04
debug-2014-10-21-report_aeroo_ooo - Failed to import necessary UNO components
2014-10-21 06:00:39,136 1387 CRITICAL AEG openerp.modules.module: Couldn't load module report_aeroo_ooo
2014-10-21 06:00:39,136 1387 CRITICAL AEG openerp.modules.module: exception() got an unexpected keyword argument 'exc_info'
2014-10-21 06:00:39,137 1387 ERROR AEG openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/opt/odoo/odoo-server/openerp/http.py", line 500, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo-server/openerp/http.py", line 517, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo-server/openerp/http.py", line 283, in _call_function
return checked_call(self.db, *args, **kwargs)
@lukebranch
lukebranch / 4GB-4Core-VPS-my.cnf
Created October 22, 2014 10:12
/etc/my.cnf config for 4GB RAM 4 Core VPS - Wordpress
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name server-1 generated for Luke at 2014-10-22 09:47:40
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
# we need some fixes from 14.10
# sudo add-apt-repository --enable-source ppa:libreoffice/libreoffice-4-3
sudo add-apt-repository ppa:libreoffice/libreoffice-4-3 -y
# fetch this repository
sudo apt-get update -y
# update your libreoffice installation
sudo apt-get install libreoffice -y
# get all build dependencies for libreoffice
sudo apt-get build-dep libreoffice -y
# that strangely enough doesn't come with the above
@lukebranch
lukebranch / gist:efd6cb2e1b10441361a3
Created January 9, 2015 05:41
theme_clean installation traceback on 8.0
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/odoo-server/openerp/http.py", line 524, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo-server/openerp/http.py", line 545, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo-server/openerp/http.py", line 301, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo-server/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
Here's a link to my answer here:
https://github.com/OdooCommunityExamples/B2B_Add_To_Cart_Example
I've put together an incredibly basic module with only the functionality needed for what you have asked in this question.
I have added the view change (that snippet) into an xml file in a subdirectory called 'views' to organise it properly. Fundamentally you just need an __init__.py file, an __openerp__.py file with your dependencies (in this case website_sale, etc.), and your view definition (in this case /views/B2B_Add_To_Cart.xml).
Inside this XML file you just need to place your <template> tags nested inside the opening and closing <openerp> and <data> tags. Remember that you are working with XHTML/XML, and therefore opening and closing tags must be properly nested or you will run into problems.
@lukebranch
lukebranch / gist:6109989e6048ad313f63
Created April 1, 2015 10:36
report_aeroo_direct_print : NameError: global name 'context' is not defined
Traceback (most recent call last):
File "/opt/odoo/odoo-server/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo-server/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo-server/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo-server/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo-server/openerp/http.py", line 300, in checked_call
@lukebranch
lukebranch / gist:ac1fa483f608ce5cb9fd
Created April 1, 2015 14:23
TypeError: write() got an unexpected keyword argument 'context'
Traceback (most recent call last):
File "/opt/odoo/odoo-server/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo-server/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo-server/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo-server/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo-server/openerp/http.py", line 300, in checked_call
@lukebranch
lukebranch / gist:4d84e39ee4ce4ec579a3
Created April 24, 2015 11:08
mass_editing: TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "/opt/odoo/odoo-server/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo-server/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo-server/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo-server/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo-server/openerp/http.py", line 300, in checked_call
@lukebranch
lukebranch / gist:0cdef0d5141b07460604
Created April 25, 2015 05:29
Aeroo Reports: Error while generating the report. "public" not defined "public" not defined For more reference inspect error logs. <type 'exceptions.Exception'>,Aeroo Reports: Error while generating the report. "public" not defined "public" not defined For more reference inspect error logs.,<traceback object at 0x7fa0c6186cf8>
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)