You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code from readme fails in Odoo v10 (Rails 4 or 5 and Ruby 2.3.1) with Ooor master branch:
so = SaleOrder.new
so.on_change('onchange_partner_id', :partner_id, 1, 1, false)
This fails with:
Ooor::TypeError:
********************************************
*********** OOOR Request ***********
method: onchange_partner_id - args: [[], 1, false]
********************************************
********************************************
*********** OpenERP Server ERROR ***********
********************************************
Traceback (most recent call last):
File "/opt/odoo/odoo-10.0/odoo/http.py", line 638, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 675, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 331, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo-10.0/odoo/service/model.py", line 119, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 324, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 933, in __call__
return self.method(*args, **kw)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 504, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo-10.0/addons/web/controllers/main.py", line 862, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo-10.0/addons/web/controllers/main.py", line 854, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo-10.0/odoo/api.py", line 681, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo-10.0/odoo/api.py", line 670, in call_kw_multi
recs = self.with_context(context or {}).browse(ids)
File "/opt/odoo/odoo-10.0/odoo/models.py", line 4856, in with_context
context = dict(args[0] if args else self._context, **kwargs)
TypeError: 'int' object is not iterable
I am trying to figure out if v10 calls the on_change method any differently. When changing the partner in the sales form through the Odoo UI, I see the following calls in the server logs with log_level debug_rpc_answer:
Hello @augustosamame
that was for calling the old Odoo on_change system. But the new system now is different (and much better). I will have a look what is the best way to call it and tell you how do to it/update the documentation.
Code from readme fails in Odoo v10 (Rails 4 or 5 and Ruby 2.3.1) with Ooor master branch:
This fails with:
I am trying to figure out if v10 calls the on_change method any differently. When changing the partner in the sales form through the Odoo UI, I see the following calls in the server logs with log_level debug_rpc_answer:
However, I cannot figure out how to convert this into the proper on_change ooor call.
The text was updated successfully, but these errors were encountered: