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"/> +