Since #6640 (closed), we have the single report option. Most of the CompanyReport (maybe all) use the user company to print on the report. But most of the time, like for sale, the company is defined on the record. It must be this company that is used to ensure coherence.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
Here is review45141002 which replaces most of the reports. There are still account_asset report and account_dunning_letter which I want to discuss:
1. The asset report prints all the depreciation lines between to dates so instead of marking it as single I think we should ask the company on the wizard that generates it and use this value on the report context.
2. The account_dunning_letter groups all lines for party but it does not take in account the company. Not sure what to do with this report. Probably it should be totally reworked to group also by company and print a letter for each company the party has dunning opened.
On 2018-05-18 14:50, Sergi Almacellas Abellana wrote:
> 1. The asset report prints all the depreciation lines between to dates so instead of marking it as single I think we should ask the company on the wizard that generates it and use this value on the report context.
I agree.
> 2. The account_dunning_letter groups all lines for party but it does not take in account the company. Not sure what to do with this report. Probably it should be totally reworked to group also by company and print a letter for each company the party has dunning opened.
I agree the dunnings should be grouped by company and the pending
payments should also be by company.
I have a better idea that allows to keep CompanyReport and does not need to modify all the reports.
The idea is to group the records of the report per headers. If there are more than 1 header, then template is execute for the records of the same header and put in a zip (like for the single report). The headers are defined by a key function on the Report class that can be extended. The CompanyReport extends it to group by company attribute of the record and add the company record to the context.