Skip to content

Instantly share code, notes, and snippets.

View rvalyi's full-sized avatar

Raphaël Valyi rvalyi

View GitHub Profile
mkdir -p parts/odoo/openerp/tools
cd parts/odoo
wget https://raw.githubusercontent.com/odoo/odoo/8.0/setup.py
wget https://raw.githubusercontent.com/odoo/odoo/8.0/odoo.py
wget https://raw.githubusercontent.com/odoo/odoo/8.0/openerp-server
wget https://raw.githubusercontent.com/odoo/odoo/8.0/openerp-gevent
cd openerp
echo "import tools" > __init__.py
wget https://raw.githubusercontent.com/odoo/odoo/8.0/openerp/release.py
wget https://raw.githubusercontent.com/odoo/odoo/8.0/openerp/loglevels.py
mkdir -p parts/odoo/openerp/tools
cd parts/odoo
wget https://raw.githubusercontent.com/odoo/odoo/7.0/setup.py
wget https://raw.githubusercontent.com/odoo/odoo/7.0/openerp-server
cd openerp
echo "import tools" > __init__.py
wget https://raw.githubusercontent.com/odoo/odoo/7.0/openerp/release.py
wget https://raw.githubusercontent.com/odoo/odoo/7.0/openerp/loglevels.py
cd tools
echo "from config import config" > __init__.py
[buildout]
parts = openerp
find-links = http://download.gna.org/pychart/
versions = versions
[openerp]
recipe = anybox.recipe.openerp:server
version = local parts/odoo
eggs = nose
openerp_scripts = nosetests=nosetests command-line-options=-d
1 Big data, high availability and full text search for OpenERP data with Apache Solr
====================================================================================
OpenERP is optimized for managing master data transactionally. But you may also need high availability
accross millions of records, with advanced full text search and this is what Apache Solr is optimized for.
Akretion created a connector for Solr reusing the CampToCamp generic asynchrone framework.
Not only your can search for records, but you can also browse their cache and even rebuild
their associations directly from Apache Solr without hitting OpenERP! This is being used
in Brazil in what we believe to be the biggest website entirely backed by OpenERP,
# somewhere in the Rails app initialization:
require 'dragonfly'
Ooor::Base.extend Dragonfly::Model
Ooor::Base.extend Dragonfly::Model::Validations
Ooor.xtend('product.product') do
dragonfly_accessor :dragon_image do
after_assign :resize_image
/home/magno/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.0.rc6/lib/faraday/options.rb:39:in `delete': undefined method `uri' for #<Faraday::ConnectionOptions:0x9b02d50> (NoMethodError)
from /home/magno/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.0.rc6/lib/faraday/options.rb:186:in `from'
from /home/magno/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.0.rc6/lib/faraday/connection.rb:284:in `proxy'
from /home/magno/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.0.rc6/lib/faraday/connection.rb:83:in `initialize'
from /home/magno/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.0.rc6/lib/faraday.rb:111:in `new'
from /home/magno/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.0.rc6/lib/faraday.rb:111:in `default_connection'
from /home/magno/.rvm/gems/ruby-2.1.0/gems/faraday-0.9.0.rc6/lib/faraday.rb:99:in `method_missing'
from /home/magno/.rvm/gems/ruby-2.1.0/gems/ridley-1.5.3/lib/ridley/middleware/chef_auth.rb:90:in `<top (required)>'
from /home/magno/.rvm/gems/ruby-2.1.0/gems/ridley-1.5.3/lib/ridley/middleware.rb:9:in `require_relat
************************ browse_record(sale.order, 28)
<OpenERPSession {'uid': 5, 'jsonp_requests': {}, 'db': 'v8', 'ecommerce_pricelist': 1, 'context': {'lang': u'en_US', 'tz': False, 'uid': 5}, 'ecommerce_order_id': 28L, 'login': 'public', 'password': 'public', 'website_session_id': 'ccb76573-795b-45f6-b0a7-9f252ea35880'}>
2014-01-03 13:52:12,876 32592 WARNING v8 openerp.osv.orm: Access Denied by record rules for operation: read on record ids: [28], uid: 5, model: sale.order
2014-01-03 13:52:12,881 32592 ERROR v8 openerp.addons.website.models.ir_http: 500 Internal Server Error:
Traceback (most recent call last):
File "/home/rvalyi/DEV/oe8/server/openerp/addons/base/ir/ir_http.py", line 117, in _dispatch
result = request.dispatch()
File "/home/rvalyi/DEV/oe8/server/openerp/http.py", line 411, in dispatch
r = self._call_function(**self.params)
=== modified file 'openerp/osv/fields.py'
--- openerp/osv/fields.py 2012-10-05 15:33:16 +0000
+++ openerp/osv/fields.py 2012-12-11 20:12:33 +0000
@@ -566,12 +566,14 @@
return
_table = obj.pool.get(self._obj)._table
obj = obj.pool.get(self._obj)
for act in values:
if act[0] == 0:
act[2][self._fields_id] = id
@rvalyi
rvalyi / application.rb
Last active January 1, 2016 23:09
rack proxy for OpenERP integration in Rails app
require 'rack-proxy'
class AppProxy < Rack::Proxy
def initialize(app)
@app = app
end
def call(env)
if env['PATH_INFO'] == "/shop"
[301, {"Location" => "/"}, self]
@rvalyi
rvalyi / gist:7789846
Created December 4, 2013 15:48
kind of kwargs passing for OpenERP on_change: with an extension like <xpath expr="//field[@name='product_id']" position="attributes"> <attribute name="context_exta">{'my_extra_param': my_extra_field}</attribute></xpath> context_exta will be injected into field context, which can be used in on_change to receive extra params without having to chan…
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 062c746..ccf1c9a 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -1869,15 +1869,33 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi
*/
build_context: function() {
// only use the model's context if there is not context on the node
- var v_context = this.node.attrs.context;
+// var v_context = this.node.attrs.context;