Create addon Generic Computed Value
Idea
We have to create addon that has to have ability to define rules to compute som evalues. This addon could be used for metrics in future, or for computed values, that could be used in generic contracts, etc.
The main object for this addon is Generic Computed Value (GValue) Each GValue has input signature, output signature and processing type.
Input signature
Input signature of GValue describes input arguments for GValues. Input signature could have one of following types:
- record
- recordset
Other input types may be added in future GValues that have type 'record' could be applied to single record of specific model GValues that have type 'recordset' could be applied to recordset (number of records) of specific model.
Thus, basically, input signature could have following fields:
- input_type: Sel(record, recordset)
- input_model: M2o(ir.model)
Output signature
Output signature of GValue describes the value returned by the GValue Output values could have one of following types:
- record
- recordset
- scalar
Record and Recordset types tell use that GValue will return record or number of records of specific model. Thus, in this case, GValue output_model has to be specified for this GValue
Scalar type means that record will return single value of one of privimive types:
- int
- float
- char
- text
- etc
Processing type
Processing type determines the way to compute the GValue. In first release, it would be enough to have only python eval processing type.Later we could add aditional processing types.