Make reports configurable by company

Sometimes, we found different companies in tryton needs different reports (for example, we need two different invoice reports for two different companies).

Right now, the reports are the same for all the companies and if you create a new report for a specific company, all the companies can see it. Besides that, the reports that we create, (e.g. invoices) will not be used when they are saved in the cache, it would also be necessary to use the report configured for each company here.

I think it will be an interesting feature to be able to choose which companies can see/ use a specific report. The current operation can be maintained if no company is indicated in a report.


I do not think it is useful but more over it will create ambiguous behavior. For example what happens if a report is executed with records from different companies? Or how do you define the company of a record (outside the obvious case of having a company field).

Indeed having different layout depending on a property of a record is already doable by putting a big Choose statement at the start of the record loop.

I think this is the simpler solution, even you can reuse some parts of the report if just some changes (for example using diferent logo o different information)