From 23deeb187d358d66a87f024c495de06575d82967 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 10 Jan 2017 15:08:18 +0100 Subject: [PATCH] [FIX] account_check_printing: remove useless sudo This sudo is useless, and prevent the use of the record rules on the creation of payments. opw-703143 --- addons/account_check_printing/account_payment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_check_printing/account_payment.py b/addons/account_check_printing/account_payment.py index 68850f7c206..23742fc73d0 100644 --- a/addons/account_check_printing/account_payment.py +++ b/addons/account_check_printing/account_payment.py @@ -86,7 +86,7 @@ class account_payment(models.Model): and vals.get('check_manual_sequencing'): sequence = self.env['account.journal'].browse(vals['journal_id']).check_sequence_id vals.update({'check_number': sequence.next_by_id()}) - return super(account_payment, self.sudo()).create(vals) + return super(account_payment, self).create(vals) @api.multi def print_checks(self):