> For now, I think the Function field is the only option. The searcher
> should probably have to return a clause like [('id', 'in', query)].
> This is not optimal but it should work.

2 questions:

- In the case of the function field is only used in a treeview for filtering 
data (just for display), isn't better to define a new modelview based on a 
query (for example: 
https://bitbucket.org/zikzakmedia/trytond-product_quantity_by_location/src ) 
Would it be more optimal ?

- What about the search function if one of the field to compare with another 
field is already a function field (for example product quantity field)? Is the 
only way of doing the search is still the query (that would be very complex in 
the case of quantity field,no ?) ?

> This is issue came up from time to time. I think it could be addresses
> by extending the domain syntax. We will need to have a way to put a
> column (with the option of being nested) as value. For example we could
> have an object Field:
> 
>     [('cost_price', '>', Field('list_price'))]
> 
> I think on the client we could have this syntax:
> 
>     "Cost Price": > @"List Price"
>
Would be nice :-)

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/2c550d10-d63a-4a6f-9c70-8b88a2021665%40googlegroups.com.

Reply via email to