[FIX] base_suspend_security: Adapt to upstream

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.
This commit is contained in:
Pedro M. Baeza
2019-02-13 15:42:13 +01:00
committed by Holger Brunn
parent 4801c32f84
commit 92ebf2dc2a
4 changed files with 32 additions and 16 deletions

View File

@@ -34,6 +34,13 @@ Usually, you'll be in in the situation to want something like this if you inheri
.. contents::
:local:
Installation
============
This version is only valid for being used since Odoo commit
dcc752aaabc10aee8bbccc1474b43d224b57023c (merged on 2019-02-20).
Usage
=====

View File

@@ -9,11 +9,11 @@ class ResUsers(models.Model):
_inherit = 'res.users'
@classmethod
def _browse(cls, ids, env, prefetch=None):
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)
], env, prefetch=prefetch, add_prefetch=add_prefetch)

View File

@@ -0,0 +1,3 @@
This version is only valid for being used since Odoo commit
dcc752aaabc10aee8bbccc1474b43d224b57023c (merged on 2019-02-20).

View File

@@ -373,19 +373,25 @@ ul.auto-toc {
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id2">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
<li><a class="reference internal" href="#installation" id="id1">Installation</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id3">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="installation">
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
<p>This version is only valid for being used since Odoo commit
dcc752aaabc10aee8bbccc1474b43d224b57023c (merged on 2019-02-20).</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<p>To use this module, you need to:</p>
<ul class="simple">
<li>depend on this module</li>
@@ -397,13 +403,13 @@ ul.auto-toc {
</ul>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
<h1><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>the magic works by wrapping uid in a marker class, so if some code unwraps this in the calling tree, security checks will be reenabled</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#id4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-backend/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
@@ -411,16 +417,16 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
<h1><a class="toc-backref" href="#id5">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
<h2><a class="toc-backref" href="#id6">Authors</a></h2>
<ul class="simple">
<li>Therp BV</li>
<li>brain-tec AG</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<h2><a class="toc-backref" href="#id7">Contributors</a></h2>
<ul class="simple">
<li>Holger Brunn &lt;<a class="reference external" href="mailto:hbrunn&#64;therp.nl">hbrunn&#64;therp.nl</a>&gt;</li>
<li>Laurent Mignon &lt;<a class="reference external" href="mailto:laurent.mignon&#64;acsone.eu">laurent.mignon&#64;acsone.eu</a>&gt;</li>
@@ -428,7 +434,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose