odoo/openerp/addons/test_new_api/tests
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 [FIX] osv: fix boolean in domain for custom field 2015-12-04 16:31:31 +01:00
test_attributes.py [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00
test_domain.py [FIX] osv: fix boolean in domain for custom field 2015-12-04 16:31:31 +01:00
test_field_conversions.py [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00
test_new_fields.py [FIX] fields: make [(5,)] with computed domain work (#13480) 2016-10-11 15:14:05 +02:00
test_no_infinite_recursion.py [FIX] models: old api, prevent infinite recursion in stored function fields 2015-08-31 17:45:21 +02:00
test_onchange.py [FIX] fields: during an onchange(), do not invalidate *2many fields because of their domain 2016-06-17 17:50:25 +02:00
test_related.py [IMP] models: convert deprecated model._all_columns into a dynamic property 2015-03-23 14:36:14 +01:00