Skip to content

Commit

Permalink
[FIX] sale: Correct fiscal position access right
Browse files Browse the repository at this point in the history
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 9434ee8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/sale/report/sale_report_templates.xml
Expand Up @@ -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">
Expand Down

0 comments on commit 9434ee8

Please sign in to comment.