Friday, January 19, 2024
1 change
Resolved issues and error corrections
This fix resolves an access restriction that prevented non-admin users from submitting invoices to ZATCA (Saudi Arabia's tax authority) or printing invoices with QR codes. The change allows all users to perform these critical invoice operations regardless of their administrative privileges, improving workflow efficiency for accounting teams.
Original PR description
Currently, when a user that is not part of the 'base.group_system' group, they are unable to submit invoices to ZATCA and print B2B invoices since the QR code requires the use of the…
Currently, when a user that is not part of the 'base.group_system' group, they are unable to submit invoices to ZATCA and print B2B invoices since the QR code requires the use of the l10n_sa_production_csid_json fields. To fix this, we mark the l10n_sa_qr_code_str as compute_sudo=True and use sudo when we try to sign XML before submission to ZATCA Description of the issue/feature this PR addresses: If a user that is not part of the base.group_system group and tries to either submit an invoice to ZATCA or print a submitted invoice with QR code, an exception will show up since one of the fields required, l10n_sa_production_csid_json, is restricted to the base.group_system group. Current behavior before PR: Access error shows up when a user that is not part of the base.group_system group tries to submit/print an invoice. Desired behavior after PR is merged: Users should be able to submit invoices to ZATCA or print submitted Invoices irrespective of their belonging to the base.group_system group. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149342 Forward-Port-Of: odoo/odoo#147893