Ciao a tutti,
sto sviluppando un nuovo modulo in Odoo8 (che gira su Ubuntu 14).
Sto utilizzando una chiamata con XML-RPC che deve scrivere una riga su sale.order ma non riesco a concludere la scrittura:
vi allego un pezzo del codice in questione
********************************************
tgt_order = {
'partner_id' : 20,
}
common = xmlrpclib.ServerProxy('http://127.0.0.1:8069/xmlrpc/common')
uid = common.login(DB,USER,PASS)
_logger.info('valore uid: %s', uid)
sock = xmlrpclib.ServerProxy('http://127.0.0.1:8069/xmlrpc/object')
idobject = sock.execute(DB, uid, PASS, 'sale.order', 'create', tgt_order)
*********************************
quando l'esecuzione arriva su sock.execute, il codice va in errore mostrando nella console questo messaggio:
Exception during JSON request handling.
Traceback (most recent call last):
File "/opt/openerp/odoo-8.0/openerp/http.py", line 544, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/openerp/odoo-8.0/openerp/http.py", line 581, in dispatch
result = self._call_function(**self.params)
File "/opt/openerp/odoo-8.0/openerp/http.py", line 317, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/openerp/odoo-8.0/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/openerp/odoo-8.0/openerp/http.py", line 314, in checked_call
return self.endpoint(*a, **kw)
File "/opt/openerp/odoo-8.0/openerp/http.py", line 810, in __call__
return self.method(*args, **kw)
File "/opt/openerp/odoo-8.0/openerp/http.py", line 410, in response_wrap
response = f(*args, **kw)
File "/opt/openerp/odoo-8.0/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/openerp/odoo-8.0/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/opt/openerp/odoo-8.0/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/openerp/odoo-8.0/openerp/addons/massive_data/wizard/order_transfer.py", line 346, in transfer_sale_orders
raise osv.except_osv('ERRORE!', msg)
Potete darmi una mano?