openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #06218
Re: advanced logical domain oeration
David:
If I understood well, you have a problem with 'in' and 'not in' operators
in orm search.
In general, the ORM translate directly both operations into the
corresponding SQL Where clause. Nevertheless the logic does not work well
with one2many or many2many relations. In particular, it does not support
for example a test for collection = [].
If this is the issue, I could recomend yout to try with the patches
published in the following bug, with patches valid for 7.0 (and I guess is
the same for 8.0): https://bugs.launchpad.net/openobject-server/+bug/1263401
Best regards
Gustavo Adrian Marino
Mobile: +54 911 5498 2515
Email: gamarino@xxxxxxxxx
Skype: gustavo.adrian.marino
2014-06-25 0:58 GMT-03:00 David Arnold - El Alemán <david@xxxxxxxxxxx>:
> *Hi*
>
> *This might be somewhat too advanced for the odoo help. So I hope to find
> some cracks here...*
>
> We have noticed that the domain operator "in" the (left, operand, rigth)
> leaf is defined as "[image: \supset]".
> Which at least in german translates to "containes" (the complement of
> "in") This is somehow syntactically (plain english) awkward. Maybe there is
> a good reason for it...
>
> However, there is no operator for a true "in" or "[image: \subset]
> " available.
>
> Note that,
>
> [image: A \subseteq B \Rightarrow A^{\rm c} \supseteq B^{\rm c}] (so
> obivous, that "not in" is not the right solution)
>
> Maybe a way could be to apply this transformation:
>
> [image: A \subseteq B \Leftrightarrow A \cap B = A]
>
> where A would be the field_value (which is passed at runtime of rule
> application only and therefore unchangable beforehand), but we probably can
> make an operation such as the intersection of A & B ... F*** this doesn't
> work either, as the A's are a hell lot of table records, which in turn are
> not available at the time of construction of the rule)
>
> *Any ideas? Am I missing something... This is very sad news, as everything
> else on the famos tax application seems to work :((((*
>
> *Thank you!*
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References