mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
On 9af8b31d921dcccb7bcf230271fd3ef4R4329, a new keyword argument was added for `_browse`, so any overriding needs to add that argument, as it's the case for this module.
20 lines
677 B
Python
20 lines
677 B
Python
# © 2015 Therp BV <http://therp.nl>
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
from odoo import models
|
|
|
|
from ..base_suspend_security import BaseSuspendSecurityUid
|
|
|
|
|
|
class ResUsers(models.Model):
|
|
_inherit = 'res.users'
|
|
|
|
@classmethod
|
|
def _browse(cls, ids, env, prefetch=None, add_prefetch=True):
|
|
"""be sure we browse ints, ids laread is normalized"""
|
|
return super(ResUsers, cls)._browse(
|
|
[
|
|
i if not isinstance(i, BaseSuspendSecurityUid)
|
|
else super(BaseSuspendSecurityUid, i).__int__()
|
|
for i in ids
|
|
], env, prefetch=prefetch, add_prefetch=add_prefetch)
|