I did read the models through XMLRPC Java lib, and I can read all models, for example:
try { models_config.setServerURL(new URL(host + "/xmlrpc/2/object")); models.setConfig(models_config); Object[] lista = (Object[]) models.execute("execute_kw", asList( db, uid, password, "product.template", "search_read", asList(asList()) ,new HashMap() {{ put("limit",1); }} ) ); for( Object obj : lista ) { System.out.println(String.valueOf(obj)); } } catch (Exception e) { e.printStackTrace(); }
This return correctely to me:
{write_date=2018-03-23 14:49:50, company_ax_id=[Ljava.lang.Object;@4b952a2d, description_purchase=false, message_partner_ids=[Ljava.lang.Object;@3159c4b8, lst_price=1.0, qty_amount=0.0, message_channel_ids=[Ljava.lang.Object;@73846619, attribute_line_ids=[Ljava.lang.Object;@4bec1f0c, type=consu, fiscal_class_code=38089999, description_sale=false, destination_type=sale, seller_ids=[Ljava.lang.Object;@29ca901e, product_variant_count=1, price=0.0, last_update=false, warranty=0.0, id=99, create_date=2018-03-23 14:47:38, default_code=2262, barcode=false, invoice_policy=order, image=, product_variant_ids=[Ljava.lang.Object;@5649fd9b, standard_price=0.0, __last_update=2018-03-23 14:49:50, pricelist_id=false, expense_policy=no, weight=0.0, active=true, message_follower_ids=[Ljava.lang.Object;@6adede5, create_uid=[Ljava.lang.Object;@2d928643, display_name=[2262] Armadilha de Bob c/ Pupa, volume=0.0, sequence=1, uom_id=[Ljava.lang.Object;@5025a98f, image_small=, packaging_ids=[Ljava.lang.Object;@49993335, track_service=manual, item_ids=[Ljava.lang.Object;@20322d26, name=Armadilha de Bob c/ Pupa, categ_id=[Ljava.lang.Object;@192b07fd, write_uid=[Ljava.lang.Object;@64bfbc86, message_is_follower=false, color=0, uom_po_id=[Ljava.lang.Object;@64bf3bbf, sale_ok=true, image_medium=, description=false, taxes_id=[Ljava.lang.Object;@55d56113, message_unread=false, supplier_taxes_id=[Ljava.lang.Object;@148080bb, qty_reserved=0.0, message_last_post=false, property_account_income_id=false, sale_line_warn=no-message, purchase_ok=true, company_id=[Ljava.lang.Object;@dc24521, multiple=1, sales_count=0, list_price=1.0, qty_available=0.0, rental=false, message_unread_counter=0, product_group_id=false, property_account_expense_id=false, message_needaction=false, related_ids=[Ljava.lang.Object;@10bdf5e5, message_needaction_counter=0, message_ids=[Ljava.lang.Object;@6e1ec318, sale_line_warn_msg=false, restricted_view=false, product_variant_id=[Ljava.lang.Object;@7e0b0338, currency_id=[Ljava.lang.Object;@617faa95}
And, this happens with other models. But when I tries get product.pricelist model, in the same code, only change product.template to product.pricelist, I get the error
org.apache.xmlrpc.XmlRpcException: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/odoo/service/wsgi_server.py", line 56, in xmlrpc_return result = odoo.http.dispatch_rpc(service, method, params) File "/usr/lib/python2.7/site-packages/odoo/http.py", line 118, in dispatch_rpc result = dispatch(method, params) File "/usr/lib/python2.7/site-packages/odoo/service/model.py", line 38, in dispatch res = fn(db, uid, *params) File "/usr/lib/python2.7/site-packages/odoo/service/model.py", line 175, in execute_kw return execute(db, uid, obj, method, *args, **kw or {}) File "/usr/lib/python2.7/site-packages/odoo/service/model.py", line 119, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/python2.7/site-packages/odoo/service/model.py", line 182, in execute res = execute_cr(cr, uid, obj, method, *args, **kw) File "/usr/lib/python2.7/site-packages/odoo/service/model.py", line 171, in execute_cr return odoo.api.call_kw(recs, method, args, kw) File "/usr/lib/python2.7/site-packages/odoo/api.py", line 679, in call_kw return call_kw_model(method, model, args, kwargs) File "/usr/lib/python2.7/site-packages/odoo/api.py", line 664, in call_kw_model result = method(recs, *args, **kwargs) File "/usr/lib/python2.7/site-packages/odoo/addons/sale_nfe/models/product_pricelist.py", line 33, in search_read headers = request.httprequest.headers File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 343, in __getattr__ return getattr(self._get_current_object(), name) File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 302, in _get_current_object return self.__local() File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 135, in _lookup raise RuntimeError('object unbound') RuntimeError: object unbound
The curious, is that when I use the Android library, this not happens, but I need use in Java only. I'm using Netbeans. The API that I using: https://www.odoo.com/documentation/11.0/webservices/odoo.html