2014-09-29 11:41 GMT+02:00 Guillem Barba Domingo <[email protected]>:

> Hi,
> I have a little model with a "childs" One2Many field, and in another model
> I have a Many2One to that where it's forbidden to select elements with
> childs.
> which domain I have to put to filter records that has a One2Many field?
>
> I tried these domains with these results:
> a) ('childs', '=', None) => it raises a "NoneType is not iterable" error
> b) ('childs', '=', []) => SQL syntax error (id = ())
>

Have you tried to use 'in' instead of '='?


> c) ('childs', '=', [None]) => any record listed (when there are records
> without childs)
>
> there is another option or (a) or (b) is a bug?
> --
> Guillem Barba
> http://www.guillem.alcarrer.net
>



-- 

Jesús Martín

Zikzakmedia SL
C/ de Sant Jaume, 9, baixos, 2ª
08720 Vilafranca del Penedès
☏ 93 890 21 08

Reply via email to