Add Action report for Balance Sheet and Profit and Loss

And authorities as Registro Mercantil.

He leído con detenimiento lo expuesto y es realmente necesario el poder imprimir los balances, en Venezuela es imprescindible para cualquier gestión bancaria ó con los entes de gobierno, si tienes una auditoria de impuestos solicitan los libros al igual que un balance impreso y el estado de Ganancias y Pérdidas.

Con los sistemas que he manejado la diferencia de estos reportes son prácticamente imperceptible varia solo la posición de la información ó la profundidad en el detalle.

Tryton ha logrado cubrir en gran medida todas las necesidades y requerimientos en la legislación y manejo de la empresa aquí en Venezuela, inclusive a superado con creces las expectativas. Pero no he de negar que realmente echo de menos los reportes de balance general y ganancias y perdidas impresos ó en PDF que se obtienen con el sistema anterior.

Aun en estos tiempos de documentación digital la legislación nos exige mantener copia impresa de estos reportes al menos por 10 años.

Estaremos al pendiente del progreso de esta discusión, mientras agradeceria me indiquen como obtengo el CVS para ajustarlo en mis formatos anteriores.

Aquí unas capturas de los que se obtenia en el sistema anterior:
Balance General

Ganancias y Pérdidas

I think I got a solution to fix both problems the CSV export and the report on tree structure.

First we add a forth key to the data sent to the report. It contains the indentation level for every ids (empty for list). This information can be used on the template to indent the records correctly. This prevents to compute it on the server side which may not be reliable depending on the actual root in the client and if the type of graph the tree is (if parent is a Many2One or Many2Many).

Second on ir.action we allow to specify if the action runs on the selected records or the listed record. This is similar to Add export CSV route (#9090) · Issues · Tryton / Tryton · GitLab. For tree this means that it is the ids of all the rows which has a parent expanded.This way report that has meaning only as an all, can set this flag and always be complete (of course there are always the case of newly created node between the client read and the report generation but I think it can be understood).

Third the CSV export that are using “Listed Record” and based on a tree, we do not use the domain (which limit only to roots) but use the rows which has a parent expanded. And when formatting the lines, we add spaces to the first column following the level.

Here are:

1 Like