Closed shaabans closed 7 years ago
Hello @shaabans it is because you are using ooor 2.4.0 instead of the master branch. I should make a new release but I wanted to finish a few things before... Meanwhile you can install the master version: in your Gemfile, add a instead:
gem 'ooor', git: 'https://github.com/akretion/ooor.git'
Then use bundle console
for instance if you want to use it in console mode. There are several other solutions to install the gem from the master branch...
I see that this issue seems like it should be resolved in https://github.com/akretion/ooor/issues/150, but I can't seem to find a way to avoid it. The following error occurs once, then if I try again immediately, it is gone and everything works normally:
irb(main):003:0> Ooor.new(:url => 'https://nurelm.odoo.com', :database => 'nurelm', :username => 'xxxx', :password => 'yyyy') D, [2017-07-15T12:14:36.491809 #44025] DEBUG -- : OOOR login - db: nurelm, username: development@nurelm.com D, [2017-07-15T12:14:36.777964 #44025] DEBUG -- : OOOR object service: rpc_method: search_read, db: nurelm, uid: 6, pass: #, obj: ir.model, method: search_read, *args: [{:fields=>["model", "name"], :offset=>0, :limit=>false, :domain=>[], :sort=>false, :context=>{"lang"=>"en_US", "tz"=>false}}] D, [2017-07-15T12:14:36.847183 #44025] DEBUG -- : registering AccountMove NameError: uninitialized constant ActiveModel::Serializers::Xml from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/mini_active_resource.rb:67:in'
from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/mini_active_resource.rb:5:in '
from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/base.rb:13:in '
<class:MiniActiveResource>' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/mini_active_resource.rb:13:in
<top (required)>' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in
require' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:inrequire' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/base.rb:16:in
<top (required)>' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in
require' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:inrequire' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/session.rb:134:in
define_openerp_model' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/session.rb:89:inblock in load_models' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/session.rb:85:in
each' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/session.rb:85:inload_models' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor/session.rb:47:in
global_login' from /Users/sms/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ooor-2.4.0/lib/ooor.rb:64:innew' from (irb):3 from /Users/sms/.rbenv/versions/2.4.0/bin/irb:11:in