[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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user