Community mailing list archives
Re: Search record using its fieldby
I think the best way to do this is to add one additional function field (computational field), type boolean, which is will be assigned as True if qty < qty2, otherwise: False. And then you can use this field as parameter in your search domain :)
I have seen the source code of the `filtered` method, its only a shortcut of what I did before using loop and if. What if I have thousands of records and I want to search for a couple record based on that query, won't it be so slow to search?
On 06/10/2016 10:47 AM, Kitti Upariphutthiphong wrote:
Given you have records. In coding you can use
records.filtered(lambda r: r.qty < r.qty2)
On Fri, Jun 10, 2016 at 9:26 AM, vak0160 <email@example.com> wrote:
I Have a model with
qty2fields, and I want to search for a record with
qty < qty2condition.
How I can do that without having to iterate all the record and search for the record sequentially using
if?-- Regards, Andre
-- Regards, Andre