diff options
| author | Goffin Simon <sig@odoo.com> | 2021-04-28 12:55:25 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2021-04-28 12:55:25 +0000 |
| commit | 11376c88e0068a0bece0b0b56ffd4a9f296ffb87 (patch) | |
| tree | cff5ae3167d66f5ea81d3c789878fc4dc9d47238 /addons/account_check_printing/models/account_payment.py | |
| parent | 5994c4dfb229f3023a89e920a97efee38828f034 (diff) | |
[FIX] account_check_printing: Only administrator can print checks
Steps to reproduce the bug:
- Let's consider a user U not in group group_system
- Log with U
- Create a vendor payment with payment method Checks
- Print it
Bug:
An access error was raised because U didn't have the rights to write on model ir.sequence
opw:2513014
closes odoo/odoo#70013
Signed-off-by: William André (wan) <wan@odoo.com>
Diffstat (limited to 'addons/account_check_printing/models/account_payment.py')
| -rw-r--r-- | addons/account_check_printing/models/account_payment.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py index 1e00af888ce..e9c6a152248 100644 --- a/addons/account_check_printing/models/account_payment.py +++ b/addons/account_check_printing/models/account_payment.py @@ -84,7 +84,7 @@ class AccountPayment(models.Model): def _inverse_check_number(self): for payment in self: if payment.check_number: - sequence = payment.journal_id.check_sequence_id + sequence = payment.journal_id.check_sequence_id.sudo() sequence.padding = len(payment.check_number) @api.depends('payment_type', 'journal_id', 'partner_id') |
