RPC¶
- class trytond.rpc.RPC([readonly[, instantiate[, result[, check_access[, unique[, fresh_session[, cache]]]]]]])¶
RPC is an object to define the behavior of Remote Procedure Call.
Instance attributes are:
- RPC.readonly¶
The transaction mode
- RPC.instantiate¶
The position or the slice of the argument to be instanciated
- RPC.result¶
The function to transform the result
- RPC.check_access¶
Set
_check_access
in the context to activate the access right on model and field. Default isTrue
.
- RPC.unique¶
If set, it ensures the instantiated records are unique. Default is
True
.
- RPC.fresh_session¶
If set, it requires a fresh session. Default is
False
.
RPCCache¶
- class trytond.rpc.RPCCache([days[, seconds])¶
Instance attributes are:
- RPC.duration¶
A timdelta instance.
Instance methods are:
- RCP.headers()¶
Returns a dictionary of the headers.