From ad2ccbbb59b7bf633e566214fdf2b811451559ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 31 Mar 2017 14:07:26 +0200 Subject: [PATCH] [IMP] account related addons: improve report naming and use print_report_name Purpose of this commit is to clean and uniformize report naming through various addons. It has been chosen to name them using a formatting like - . Improve report naming in sale, point of sale, l10n_ch, purchase, purchase requisition, report intrastat, website_quote --- addons/account/views/account_report.xml | 45 +++++++++---------- addons/l10n_ch/report/isr_report.xml | 16 +++---- .../views/point_of_sale_report.xml | 2 +- addons/purchase/report/purchase_reports.xml | 14 +++--- .../report/purchase_requisition_report.xml | 22 ++++----- .../report/report_intrastat_report.xml | 19 ++++---- addons/sale/report/sale_report.xml | 10 ++--- .../report/sale_order_reports.xml | 6 +-- 8 files changed, 57 insertions(+), 77 deletions(-) diff --git a/addons/account/views/account_report.xml b/addons/account/views/account_report.xml index ddf5cb21cb0..36f7eea7ee8 100644 --- a/addons/account/views/account_report.xml +++ b/addons/account/views/account_report.xml @@ -11,19 +11,17 @@ file="account.report_invoice" attachment_use="True" attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')" + print_report_name="( + object.type == 'out_invoice' and object.state == 'draft' and 'Draft Invoice' or + object.type == 'out_invoice' and object.state in ('open','paid') and 'Invoice - %s' % (object.number) or + object.type == 'out_refund' and object.state == 'draft' and 'Credit Note' or + object.type == 'out_refund' and 'Credit Note - %s' % (object.number) or + object.type == 'in_invoice' and object.state == 'draft' and 'Vendor Bill' or + object.type == 'in_invoice' and object.state in ('open','paid') and 'Vendor Bill - %s' % (object.number) or + object.type == 'in_refund' and object.state == 'draft' and 'Vendor Credit Note' or + object.type == 'in_refund' and 'Vendor Credit Note - %s' % (object.number))" /> - - (object.type == 'out_invoice' and object.state == 'draft' and 'Draft Invoice' or - object.type == 'out_invoice' and object.state in ('open','paid') and 'Invoice'+'-'+(object.number) or - object.type == 'out_refund' and object.state == 'draft' and 'Credit Note' or - object.type == 'out_refund' and 'Credit Note'+'-'+(object.number) or - object.type == 'in_invoice' and object.state == 'draft' and 'Vendor Bill' or - object.type == 'in_invoice' and object.state in ('open','paid') and 'Vendor Bill'+'-'+(object.number) or - object.type == 'in_refund' and object.state == 'draft' and 'Vendor Credit Note' or - object.type == 'in_refund' and 'Vendor Credit Note'+'-'+(object.number)) - - - - (object.type == 'out_invoice' and object.state == 'draft' and 'Duplicate Invoice' or - object.type == 'out_invoice' and object.state in ('open','paid') and 'Duplicate Invoice'+'-'+(object.number) or - object.type == 'out_refund' and object.state == 'draft' and 'Duplicate Credit Note' or - object.type == 'out_refund' and 'Duplicate Credit Note'+'-'+(object.number) or - object.type == 'in_invoice' and object.state == 'draft' and 'Duplicate Vendor Bill' or - object.type == 'in_invoice' and object.state in ('open','paid') and 'Duplicate Vendor Bill'+'-'+(object.number) or - object.type == 'in_refund' and object.state == 'draft' and 'Duplicate Vendor Credit Note' or - object.type == 'in_refund' and 'Duplicate Vendor Credit Note'+'-'+(object.number)) - - - 'Due Payments'+'-'+(object.name) - + print_report_name="'Due Payments - %s' % (object.name)" + /> - - - - 'ISR-' + object.number - - - - + print_report_name="'ISR-%s' % object.number" + paperformat="paperformat_euro_no_margin"/> +