[MERGE] forward port of branch saas-6 up to e2faeab
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
Germany, 2015-02-26
|
||||
Germany, 2016-04-20
|
||||
|
||||
initOS GmbH & Co. KG agrees to the terms of the Odoo Corporate
|
||||
initOS GmbH agrees to the terms of the Odoo Corporate
|
||||
Contributor License Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this
|
||||
@@ -8,7 +8,7 @@ declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Markus Schneider markus.schneider@initos.com https://github.com/OSguard
|
||||
Frederik Kramer frederik.kramer@initos.com https://github.com/OSevangelist
|
||||
|
||||
List of contributors:
|
||||
|
||||
@@ -19,3 +19,5 @@ Frederik Kramer frederik.kramer@initos.com https://github.com/OSevangelist
|
||||
Nikolina Todorova nikolina.todorova@initos.com https://github.com/ntodorova
|
||||
Peter Hahn peter.hahn@initos.com https://github.com/codingforfun
|
||||
Claudia Haida claudia.haida@initos.com
|
||||
Andreas Zöllner andreas.zoellner@initos.com https://github.com/azoellner
|
||||
Rami Alwafaie rami.alwafaie@initos.com https://github.com/rami-wafaie
|
||||
|
||||
+9
-3
@@ -1818,9 +1818,15 @@ class _RelationalMulti(_Relational):
|
||||
|
||||
def _compute_related(self, records):
|
||||
""" Compute the related field ``self`` on ``records``. """
|
||||
for record in records:
|
||||
other, field = self.traverse_related(record)
|
||||
record[self.name] = other[field.name]
|
||||
super(_RelationalMulti, self)._compute_related(records)
|
||||
if self.related_sudo:
|
||||
# determine which records in the relation are actually accessible
|
||||
target = records.mapped(self.name)
|
||||
target_ids = set(target.search([('id', 'in', target.ids)]).ids)
|
||||
accessible = lambda target: target.id in target_ids
|
||||
# filter values to keep the accessible records only
|
||||
for record in records:
|
||||
record[self.name] = record[self.name].filtered(accessible)
|
||||
|
||||
|
||||
class One2many(_RelationalMulti):
|
||||
|
||||
@@ -1012,7 +1012,7 @@ class expression(object):
|
||||
if right is not False:
|
||||
if isinstance(right, basestring):
|
||||
op = {'!=': '=', 'not like': 'like', 'not ilike': 'ilike'}.get(operator, operator)
|
||||
res_ids = [x[0] for x in comodel.name_search(cr, uid, right, [], op, context=context)]
|
||||
res_ids = [x[0] for x in comodel.name_search(cr, uid, right, [], op, context=context, limit=None)]
|
||||
if res_ids:
|
||||
operator = 'not in' if operator in NEGATIVE_TERM_OPERATORS else 'in'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user