Open
Conversation
Changes: - Adds a new Server Action, Batch Print Reports, for Sale Order and Product Template models - Adds a new wizard, Batch Print Report Wizard, that is launched by the Server Action - All HTML reports for the model are available for batching - Adds the option to collate reports by record instead of report
dpsholtes
approved these changes
Sep 14, 2022
Jessica-BlueStingray
approved these changes
Sep 19, 2022
traviswaelbro
requested changes
Sep 21, 2022
traviswaelbro
left a comment
There was a problem hiding this comment.
Untested, but looks good overall. Have a few requests
| class BatchPrintReportsWizard(models.TransientModel): | ||
| _name = "batch.print.reports.wizard" | ||
| _description = "Batch Print Reports Wizard" | ||
|
|
Comment on lines
+12
to
+14
| model_name = fields.Char(string="Model Name") | ||
| res_model = fields.Char(string="Model") | ||
| res_ids = fields.Char(string="Record IDs") |
There was a problem hiding this comment.
Some help strings on these would be helpful imo
Comment on lines
+34
to
+40
| template_id = generic_template_id.copy({ | ||
| "name": "{}_parent_report_template_{}".format(self.res_model.replace(".", "_"), random.randint(0, 99999)), | ||
| "type": "qweb", | ||
| "model": self.res_model, | ||
| "mode": "primary", | ||
| "arch_base": generic_template_id.arch_base, | ||
| }) |
There was a problem hiding this comment.
Does this need to be destroyed after we're done with it?
| subreport_ids = fields.One2many("ir.actions.report.subreport", "parent_report_id") | ||
|
|
||
| def generate_top_part(self): | ||
| def generate_top_part(self, collate_by_record=False): |
There was a problem hiding this comment.
Can we get docstrings on the methods in this file? In particular, I'd like to see some explanation about all of the \n and \t characters being used.
|
Has anyone functionally tested this? I know there are still some remaining issues, but @ambientstl can you assign QA if this should have it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#958696098 Batch report printing
Depends on PR #2
Changes:
To test:
gobluestingray/reporting-enginereport_batchmodule to to the 15.0 branch ofblue_odoo_addons's docker-compose.base.yml (in services.volumes)../<reporting-engine repo name>/report_batch:/opt/odoo/vendor/report_batchsalemodule in the 15.0 branch ofblue_odoo_addonsblue_odoo_addons, install thereport_batch(and the "Sales") module(s), and check out the new functionalityRemaining Issues:
active_idsto the context, but the report was still blank