[FIX] sale: Correct fiscal position access right

The issue happened when a user which does not have access to some fiscal
position try to print a sale order. In this case a traceback is generated.
In order to avoid the traceback and to be able to print the report
the access rights are bypass thanks to a sudo() in the report.

OPW-1943727

closes odoo/odoo#31357
This commit is contained in:
Nathan de Pryck
2019-02-22 10:55:56 +00:00
parent a1e6a0f0c5
commit 9434ee850f
+2 -2
View File
@@ -192,9 +192,9 @@
<p t-if="doc.payment_term_id.note">
<span t-field="doc.payment_term_id.note"/>
</p>
<p id="fiscal_position_remark" t-if="doc.fiscal_position_id and doc.fiscal_position_id.note">
<p id="fiscal_position_remark" t-if="doc.fiscal_position_id and doc.fiscal_position_id.sudo().note">
<strong>Fiscal Position Remark:</strong>
<span t-field="doc.fiscal_position_id.note"/>
<span t-field="doc.fiscal_position_id.sudo().note"/>
</p>
<div t-if="doc.signature" class="mt32 ml16 mr16" name="signature">