Skip to content
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.

  • Loading branch information...
ndeodoo committed Feb 22, 2019
1 parent a463a87 commit 17508e6a56346dae01888ab87fffdcc09db2d5e4
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 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"/>

<div t-if="doc.signature" class="mt32 ml16 mr16" name="signature">

0 comments on commit 17508e6

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