← Back to team overview

openerp-community team mailing list archive

Re: Domain filters comparing 2 fields

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

> is there any way to say [('credit_limit','<',valueof(credit))] or 
> [('field1','=',valueof(field2))] ??

no.

Write a boolean function field called 'credit_limit_exceeded' whose
search function searches for your term in sql and returns a domain
with the ids for which the condition is met:
https://doc.odoo.com/trunk/server/03_module_dev_02/#fnct-search-parameter

Bonus points for reversing that when searching for
[('credit_limit_exceeded', '=', False)]

- -- 
Therp - Maatwerk in open ontwikkeling

Holger Brunn - Ontwerp en implementatie

mail: holger@xxxxxxxx
web: http://therp.nl
phone: +31 (0)20 3093096
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iF4EAREIAAYFAlSFW/kACgkQAcl2D+yjrhjqLQD9ErJPnV26GWgFYojWJkiPpI0e
+zx8qyZHn2pPdalGZDsA/R5h3FdUS7ItL0Pw26z5kBPejK/ezH8obo3tkHHmfDNm
=SU5X
-----END PGP SIGNATURE-----


References