How to git rid of leading model name in report filename?

Looking at Custom filename for report, we tried setting e.g. invoice record name but there is ‘Facture-’ always prepended to it… excepting when multiple invoices are selected, then it’s a number ‘1-’, ‘2-’ and so on.

This is a PITA, how to turn that off?

I fail to see any added value prepending anything if the record name is set, but worst case, perhaps it’s possible to have a special character, maybe a caret (‘^’), to indicate that no prefixing should be done for these reports…

The action name is always included as first part of the report.
You can not remove it unless you override it by code.

But you can change the text shown by changing the name of the action report.

Therefore I formally propose to fix that, as indicated prior.

I already indicated my opinion above, what is the general consensus?

  • If the user sets a value for a report’s record name, then completely override the default value (1)
  • Keep the current manner, but provide a mechanism to override the default prefixed action name to the user’s record name set
0 voters

(1) It should be possible to allow the user to use a token representing the default action name/index
This, at least, minimises the surprise to the user when the resulting report name is not as expected.

You can not because this is the name of the report. Including the record name is just an option (default).
The record names can not be a valid name for a report because a record can have many different reports. But also a record name never defines what kind of record it is.
Finally the report name is used also for the name of email attachment. The recipients will have no clue about what is the attachment if it contains only record names.

I think there is a missunderstanding here.

Risto wants to change the full filename of the report, including both the report name and the record name.
Also know the report name is always included on the start of the report, but i’ve seen some people which prefer to include the record name first and latter the record name.

There is no easly way to do that on Tryton and for that reason we are getting the requests to update them.

This is just nitpicking on a small detail. We are not going to complicate the code for that.

Also having the report name as prefix provide an automatic grouping of reports by type.

I proposed to make everything dynamic so a user can do whatever he wants.
Just make it possible to ‘build’ a full filename I want, in the way I want. For now I have done it in a module which overrides the execute function.

It’s about the filename not the report name. The filename is used when the report is stored outside Tryton or send by email. Now I have to rename the filename because it doesn’t meet my requirements.
Also grouping is nitpicking because when reports are stored on disk, they are already grouped in sub directories. It depends but those reports on disk are most of the time sorted by the sequence number or party name.

The biggest issue I see is when you want to print a report from multiple records without single checked.

Adapt your requirements.

I expect such an answer from a consultant of a closed source ERP system and then I have to adapt because there is no other way. But Tryton is open-source so there are different ways to adapt Tryton to My requirements.

I also tell potential customers that Tryton can be molded into their workflow in the way they want it, not the other way around. And sometimes the same question comes along so then the idea is raised if it is something to have in the core.


Being Open Source does not mean that the software must be adapted for every body use case.
Tryton is probably the most customizable ERP system, you can adapt to almost what ever workflow or requirements. But the maintainer choose what are the best default behavior and the available options.

Here people are nitpicking because the report name is in front of the filename. This is our choice but any developer can change this behavior. But we do not want to support more options in core for this feature.

So my point is adapt to the software if you are not willing to invest in development to customize like you wish.

Thanks for this clear statement. I fully understand what you mean, you cannot just support any option.

1 Like