mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] test proxy recordset union / concatenation
Apparently I wrote this when I was a dumbshit and did not think that Python sets are implemented completely separately from dicts and *remain unordered*. As a result, the simplistic set union would not properly conserve record order, which it should.
This commit is contained in:
parent
2b64f7feb3
commit
a541781ee0
@ -1123,7 +1123,11 @@ class Model:
|
||||
if not isinstance(other, Model) or self._model != other._model:
|
||||
return NotImplemented
|
||||
|
||||
return Model(self._env, self._model, {*self._ids, *other._ids}, fields=self._fields)
|
||||
return Model(
|
||||
self._env, self._model,
|
||||
self._ids + tuple(id_ for id_ in other.ids if id_ not in self._ids),
|
||||
fields=self._fields
|
||||
)
|
||||
__add__ = __or__
|
||||
|
||||
def __and__(self, other):
|
||||
|
Loading…
Reference in New Issue
Block a user