odoo/openerp/osv
Jairo Llopis dd312e0da2 [FIX] fields: make [(5,)] with computed domain work (#13480)
* Failing test for one2many [(5,)] action, when domain is callable.

The problem is that `self` inside a callable domain becomes the comodel when at [(5,)].

* [FIX][fields] Make [(5,)] with computed domain work.

To reproduce this failure, declare a field like:

```
child_ids = fields.One2many(
    comodel_name="other.model",
    domain=lambda self: [("id", "in", self._ids_to_find())],
)
```

Now set some value to it.

Now unset them. Impossible because ``self`` becomes ``other.model`` in domain evaluation.
2016-10-11 15:14:05 +02:00
..
__init__.py [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00
expression.py [FIX] expression: fix missing results in direct search on many2many fields 2016-04-29 15:48:19 +02:00
fields.py [FIX] fields: make [(5,)] with computed domain work (#13480) 2016-10-11 15:14:05 +02:00
orm.py [FIX] base: centralize custom data serialization for builtin types only 2016-02-02 22:42:31 +01:00
osv.py [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00
query.py [REM] Deleted .apidoc lines. 2013-02-12 15:24:10 +01:00