Assuming we have the code in:
From our code:
op = ProcessOperation()
op.custom_method = 'custom.operations.helloworld'
op.method = 'op_custom'
op.name = 'Operacion Hello World'
op.order = 900
op.enabled = True
So far we have created the operation. The order can be adjusted, it does not necessarily have to be 900.
To be included in the series:
serie = Serie.objects.get(name = 'my_serie_name')
Where we replace "my_serie_name" by the name of the series in which we are going to include the operation.