[FIX] sale: Display correclty 'Pro-forma #' on invoice report
Purpose ======= When sending a proforma by email, the email template is correclty rendered. But 'Quotation #' id displayed on the printed report instead of 'Pro-forma' # Specification ============= - Retrieve correctly the context key in the template - Remove the associated ir.actions.report.xml as we cannot pass a specific context from there
This commit is contained in:
@@ -12,17 +12,5 @@
|
||||
<record id="report_sale_order" model="ir.actions.report.xml">
|
||||
<field name="print_report_name">(object.state in ('draft', 'sent') and 'Quotation'+'-'+(object.name) or 'Order'+'-'+(object.name))</field>
|
||||
</record>
|
||||
|
||||
<report
|
||||
string="Pro-Forma"
|
||||
id="report_proforma_quotation"
|
||||
model="sale.order"
|
||||
report_type="qweb-pdf"
|
||||
name="sale.report_saleproforma"
|
||||
file="sale.report_saleorder"
|
||||
/>
|
||||
<record id="report_proforma_quotation" model="ir.actions.report.xml">
|
||||
<field name="print_report_name">'Pro-Forma'+'-'+(object.name)</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
<t t-if="not proforma">
|
||||
<t t-if="not env.context.get('proforma', False)">
|
||||
<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="proforma">
|
||||
<t t-if="env.context.get('proforma', False)">
|
||||
<span>Pro-Forma # </span>
|
||||
</t>
|
||||
<span t-field="doc.name"/>
|
||||
|
||||
Reference in New Issue
Block a user