report name

12 views
Skip to first unread message

JC Michel

unread,
Aug 3, 2018, 3:53:51 AM8/3/18
to tryton
Hi,


Is it possible to have reports named with the number ?
For instance, Sale_2 instead of Sale or 2018-08-03_Invoice_1234.pdf
instead of Invoice.
Maybe would it be possible with the <meta:user-defined
meta:name="xxxx"/> of fodt format ?

--
Jean-Christophe Michel

Dominique Chabord

unread,
Aug 3, 2018, 4:08:55 AM8/3/18
to tryton
2018-08-03 9:53 GMT+02:00 JC Michel <lists.j...@symetrie.com>:
> Hi,
>
>
> Is it possible to have reports named with the number ?
> For instance, Sale_2 instead of Sale or 2018-08-03_Invoice_1234.pdf instead
> of Invoice.

I think it is the case for posted invoices, but not for sales. I was
told it is a bit complex and you can get different versions for the
same sale.

> Maybe would it be possible with the <meta:user-defined meta:name="xxxx"/> of
> fodt format ?


>
> --
> Jean-Christophe Michel
>
> --
> You received this message because you are subscribed to the Google Groups
> "tryton" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tryton/8E0675CB-B739-4F93-B59B-DA6D4CB83BBD%40symetrie.com.

Korbinian Preisler

unread,
Aug 3, 2018, 4:21:28 AM8/3/18
to try...@googlegroups.com
Hi,

On 03.08.2018 09:53, JC Michel wrote:
> Hi,
>
>
> Is it possible to have reports named with the number ?
> For instance, Sale_2 instead of Sale or 2018-08-03_Invoice_1234.pdf
> instead of Invoice.
> Maybe would it be possible with the <meta:user-defined
> meta:name="xxxx"/> of fodt format ?

the report_name is part of the return value of Report.execute()[1].
It is possible to modify the report name at this place.

For the future i would like to have some refactoring at this point with
a method _get_report_name() that would allow to add custom solutions for
computing the report name at this point.

Best,

Korbinian

[1] http://hg.tryton.org/trytond/file/tip/trytond/report/report.py#l185

JC Michel

unread,
Aug 3, 2018, 8:45:47 AM8/3/18
to tryton
Hi,

On 3 Aug 2018, at 10:08, Dominique Chabord wrote:
> I think it is the case for posted invoices, but not for sales.

True, posted invoices have the number in their name, though it doesn’t
seem configurable.
Thks

Jean-Christophe Michel
Reply all
Reply to author
Forward
0 new messages