There is a report in our application.
Report’s columns are dynamically selected from the specified fields of the specified database tables.
Description of the dynamic fields (columns) in our model:
attr1 = fields.Char('Attr1') attr2 = fields.Char('Attr2') attr3 = fields.Char('Attr3') ...
In the table_query() selection is generated dynamically:
tableA.join(tableB, ...) .join(tableC, ...) ... .select( tableA.field1.as_('attr1'), tableB.field5.as_('attr2'), tableC.field10.as_('attr3'), ... )
We would like column labels ‘Attr1’, ‘Attr2’, ‘Attr3’ to change into ‘Field1’, ‘Field5’, ‘Field10’ respectively
(both in query results tree view and in ods-report).
We managed to do this in ods-report, but failed in tree view.
We tried to change ‘string’ attributes of these columns in view_attribute() method, but this does not work.
Is it doable in Tryton?