Commit Graph
4 Commits
Author SHA1 Message Date
Naglis Jonaitis 24563df00b [FIX] base: XML-RPC controller methods
`method` has no effect, so currently XML-RPC can be called via other
methods, e.g. GET, which is against XML-RPC specification.

closes odoo/odoo#37917

X-original-commit: c2fe13d31f6b55900ad139d4e75b8c1a0c4ac165
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-10-03 16:13:14 +00:00
Adrian Torres 2693918903 [FIX] xmlrpc: properly marshall date & datetime objects
Before this revision, trying to read a Date field using xmlrpc would
result in a marshalling error.

This is due to the fact that 960360afe4
changed the internal value of Date/Datetime fields to hold
datetime.date/datetime objects.

The xmlrpc layer is capable of converting datetimes to the XML
datetime representation, but this is not possible for datetime.date
objects.

In order to solve this, the Marshaller class used by python's
xmlrpc.client is overridden and monkey-patched, allowing to convert
datetime.date / datetime.datetime objects into properly formatted
strings.

opw-1896364

closes odoo/odoo#28022
2018-10-22 12:22:59 +00:00
Christophe Simonis f65528a74e [IMP] http: avoid saving sessions for some endpoints
Endpoints can be explicitly marked as `save_session=False` (default is
true across the board). In that case they will have an in-memory session
(either the existing one or a brand new one) but the session won't be
persisted to disk.

Currently used for non-browser RPC endpoints: the APIs don't use
cookies/sessions and we can't assume the RPC libraries keep cookies
across calls. This means a new session is created and saved to disk for
each RPC calls, for no useful reason.
2018-05-28 09:48:29 +02:00
Jairo Llopis 285ead28e3 [IMP] Handle XMLRPC calls from standard controllers
This way, XMLRPC calls can get request details form the standard
`odoo.http.request` system.

Move jsonrpc to the same controller while at it, for coherence.

Fix #24183
2018-05-09 09:46:15 +02:00