[IMP] sale: make SO download/print same on portal than backend

We don't want two different reports for the same thing.

We will therefore lose the ability to print the "quotation builder" report built with the snippets.

PR: #27293
task-1889346
This commit is contained in:
Sébastien Theys
2018-09-28 14:36:26 +02:00
parent 7f3b2d09c1
commit a3dc91a0db
3 changed files with 1 additions and 29 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ class CustomerPortal(CustomerPortal):
return request.redirect('/my')
if report_type in ('html', 'pdf', 'text'):
return self._show_report(model=order_sudo, report_type=report_type, report_ref='sale.report_web_quote', download=download)
return self._show_report(model=order_sudo, report_type=report_type, report_ref='sale.action_report_saleorder', download=download)
# use sudo to allow accessing/viewing orders for public user
# only if he knows the private token
-13
View File
@@ -21,18 +21,5 @@
name="sale.report_saleorder_pro_forma"
print_report_name="'PRO-FORMA - %s' % (object.name)"
/>
<report
id="report_web_quote"
string="Web Quotation"
model="sale.order"
report_type="qweb-pdf"
file="sale.report_quotation"
name="sale.report_quotation"
menu="False"
print_report_name="
(object.state in ('draft', 'sent') and 'Quotation - %s' % object.name or
'Order - %s' % (object.name))"
/>
</data>
</odoo>
@@ -232,19 +232,4 @@
</t>
</template>
<template id="report_quotation">
<t t-call="web.html_container">
<t t-set="data_report_margin_top" t-value="45"/>
<t t-set="data_report_header_spacing" t-value="40"/>
<t t-call="web.external_layout">
<t t-set="o" t-value="docs[0]"/>
<t t-foreach="docs" t-as="sale_order">
<div class="page">
<t t-call="sale.sale_order_portal_content"/>
</div>
</t>
</t>
</t>
</template>
</odoo>