odoo/openerp/addons/test_new_api
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
..
tests [FIX] fields: make [(5,)] with computed domain work (#13480) 2016-10-11 15:14:05 +02:00
__init__.py [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00
__openerp__.py [FIX] models: old api, prevent infinite recursion in stored function fields 2015-08-31 17:45:21 +02:00
demo_data.xml [FIX] osv: fix boolean in domain for custom field 2015-12-04 16:31:31 +01:00
ir.model.access.csv [FIX] models: inverse several computed fields based on a common computed field 2016-06-22 14:01:59 +02:00
models.py [FIX] fields: make [(5,)] with computed domain work (#13480) 2016-10-11 15:14:05 +02:00
views.xml [FIX] fields: during an onchange(), do not invalidate *2many fields because of their domain 2016-06-17 17:50:25 +02:00