[FIX] account: allow sending of paid invoice if no Accounting rights

If a user with Sales rights but no Accounting rights is trying to send an already
paid invoice, it will raise an access rights error before this commit while we
should allow him to send it without error.

closes odoo/odoo#48820

X-original-commit: 27cb9197c6b64fb9cb8fe46a20d9557914045e59
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
This commit is contained in:
alt-odoo
2020-04-02 07:45:20 +00:00
parent 2a184ae62c
commit a7e09fb05b
+1 -1
View File
@@ -189,7 +189,7 @@
<template id="report_invoice_document_with_payments" inherit_id="account.report_invoice_document" primary="True">
<xpath expr="//div[@id='total']/div/table" position="inside">
<t t-if="o.payment_state != 'invoicing_legacy'">
<t t-set="payments_vals" t-value="o._get_reconciled_info_JSON_values()"/>
<t t-set="payments_vals" t-value="o.sudo()._get_reconciled_info_JSON_values()"/>
<t t-foreach="payments_vals" t-as="payment_vals">
<tr>
<td>