From f057bfd68f625048c7fd48eb45c8f005d6fc8d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 25 Nov 2016 10:49:48 +0100 Subject: [PATCH] Use sale report as example for report replacement The invoice report example does not work because it is managed by a wizard. issue6054 review25821002 --- doc/topics/reports/index.rst | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/doc/topics/reports/index.rst b/doc/topics/reports/index.rst index 9622f6f04b..01128c2038 100644 --- a/doc/topics/reports/index.rst +++ b/doc/topics/reports/index.rst @@ -178,35 +178,45 @@ Replacing existing Tryton reports To replace an existing report you must deactivate the old report and activate the new report. -For example to deactivate the invoice report: +For example to deactivate the sale report: .. highlight:: xml :: - + -Then you must activate the new invoice report that exists in your new module: +Then you must activate the new sale report that exists in your new module: .. highlight:: xml :: - - Invoice - account.invoice - account.invoice - my_module/invoice.odt + + Sale + sale.sale + sale.sale + my_module/sale.odt odt +And create the keyword for the new report: + +.. highlight:: xml + +:: + + + form_print + sale.sale,-1 + + + Passing custom data to a report ------------------------------- -TODO: Examples of overriding Report.execute. - In this example `Report.get_context` is overridden and an employee object is set into context. Now the invoice report will be able to access the employee object.