Skip to content
Permalink
Browse files

[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 #31357
  • Loading branch information...
ndeodoo committed Feb 22, 2019
1 parent a1e6a0f commit 9434ee850fdf322c8ac126209d7da8f31a9c959a
Showing with 2 additions and 2 deletions.
  1. +2 −2 addons/sale/report/sale_report_templates.xml
@@ -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">

0 comments on commit 9434ee8

Please sign in to comment.
You can’t perform that action at this time.