[FIX] sale : add pro-froma invoice report into print buttons.

Was PR#19684
This commit is contained in:
Mehul Patel
2017-09-28 15:25:23 +02:00
committed by qdp-odoo
parent 9f9a7fdd0d
commit 1bce0a398d
2 changed files with 22 additions and 2 deletions
+10
View File
@@ -10,5 +10,15 @@
name="sale.report_saleorder"
print_report_name="(object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name)"
/>
<report
id="action_report_pro_forma_invoice"
string="PRO-FORMA Invoice"
model="sale.order"
report_type="qweb-pdf"
file="sale.report_saleorder_pro_forma"
name="sale.report_saleorder_pro_forma"
print_report_name="'PRO-FORMA - %s' % (object.name)"
/>
</data>
</odoo>
+12 -2
View File
@@ -29,11 +29,11 @@
</div>
<h2>
<t t-if="not env.context.get('proforma', False)">
<t t-if="not (env.context.get('proforma', False) or is_pro_forma)">
<span t-if="doc.state not in ['draft','sent']">Order # </span>
<span t-if="doc.state in ['draft','sent']">Quotation # </span>
</t>
<t t-if="env.context.get('proforma', False)">
<t t-if="env.context.get('proforma', False) or is_pro_forma">
<span>Pro-Forma Invoice # </span>
</t>
<span t-field="doc.name"/>
@@ -201,4 +201,14 @@
</t>
</t>
</template>
<template id="report_saleorder_pro_forma">
<t t-call="web.html_container">
<t t-set="is_pro_forma" t-value="True"/>
<t t-foreach="docs" t-as="doc">
<t t-call="sale.report_saleorder_document" t-lang="doc.partner_id.lang"/>
</t>
</t>
</template>
</odoo>