-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/15.0/batch report printing #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 15.0
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Untested, but looks good overall. Have a few requests
class BatchPrintReportsWizard(models.TransientModel): | ||
_name = "batch.print.reports.wizard" | ||
_description = "Batch Print Reports Wizard" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some help
strings on these would be helpful imo
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be destroyed after we're done with it?
@@ -25,25 +25,44 @@ class IrActionsReport(models.Model): | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
#958696098 Batch report printing
Depends on PR #2
Changes:
To test:
gobluestingray/reporting-engine
report_batch
module 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_batch
sale
module in the 15.0 branch ofblue_odoo_addons
blue_odoo_addons
, install thereport_batch
(and the "Sales") module(s), and check out the new functionalityRemaining Issues:
active_ids
to the context, but the report was still blank