Is there any tutorial how you make a plugin? I want to make a geolocator and geofencing plugin.
There is an official tutorial how to make a module (running inside trytond).
This tutorial teaches general concepts how to program using the tryton framework.
It sounds like what you want to make is something that runs outside of tryton.
For this I think you need to interact with tryton.
The following options for interacting with tryton are used:
- By proteus scripting client
- By User application
You can even communicate with trytond using rpc (the same way the client communicates with tryton) or you can make a web-app using Flask
Chronos is a plug-in for web-browsers, probably not what you need, but maybe you can get some examples for communication.
I might be the wrong person to answer your question as I have not created any major tryton development project. I know you need to shorten your list of options, not make it longer.
I think sharing more specific details about how you want the geo-locator to run.
Who should run it? An employee of Company? What language do you want the plug-in to run?
I guess you are talking about the client plugin.
For tryton, it should be a Python module put in the plugins
directory that have a method get_plugins(model)
that must return a sequence of tuple composed of the name of the plugin and the plugin function. The function takes a dictionary argument with the model
, model_context
, id
, ids
and paths
.
In Python typing::
class Data(TypedDict):
model: str
model_context: str
id: int
ids: Sequence[int]
paths: Sequence[Tuple[int]]
Sequence[Tuple[str, Callable[Data]]
In sao the custom Javascript must push in Sao.Plugins
an object with the methods get_plugins
which must return the same kind of list.