Redesign the report section
- change the strategy:
- In the current implementation reports are based on a query from the database.
- It would be more general if reports are based on a
DataFrame
.
- The
DataFrame
can be filled with the content of a database table including foreign fields or by a dedicated algorithm mixing, for example, different events.
- In the model register the source producing the
DataFrame
, a dictionary linking a name to a function.
- The report configuration should contains 6 sections
- Select the source
- Define selection criteria / query. It is based on a string written in natural language and on the
DataFrame.query
method.
- Transform the source using pandas chaining. It is a string interpreted using python
eval
, a general approach which should allow all kind of postprocessing.
- View defining the DataFrame columns which are shown in the Ext JS Grid, the grouping and the summary.
- Summary to customize summary row of the grid: per group, total, etc
- Permission to define roles with can used this report. Add a
JSON
field containing the list of role allowed to see the report
- ...
- In order to implement this approach: