[FIX] sale : add pro-froma invoice report into print buttons.
Was PR#19684
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user