mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
pass context to printer to use it for example in print_options()
* context was lost while getting report * now it will be passed using with_context * could be used for print_options (example: pass copies amount for productlabals)
This commit is contained in:
@@ -42,7 +42,8 @@ class Report(models.Model):
|
|||||||
raise exceptions.Warning(
|
raise exceptions.Warning(
|
||||||
_('No printer configured to print this report.')
|
_('No printer configured to print this report.')
|
||||||
)
|
)
|
||||||
return printer.print_document(report, document, report.report_type)
|
return printer.with_context(context).print_document(
|
||||||
|
report, document, report.report_type)
|
||||||
|
|
||||||
@api.v8
|
@api.v8
|
||||||
def print_document(self, records, report_name, html=None, data=None):
|
def print_document(self, records, report_name, html=None, data=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user