[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
This commit is contained in:
Denis Ledoux
2017-01-10 15:09:24 +01:00
parent 3f7b1f6083
commit 23deeb187d
@@ -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):