Hi everyone,
New question on how to implement search in Treeview for not a field,
and not for a relational field. But for a field within 3rd lever
relation.
imagine we would like to define a pricelist, within a pricelist we
have many contracts, within contracts we have many product line. Now
in product line of course we have a product field (product.product
relation) and some other staff which works as additional properties.
Now we would like to implement standard search ( search boxes above
the Treeview by select="1") .
The question is how to implement it more beautiful.
As it might be very applicable in other modules it's useful for me to
give other members advises.
I myself start with some rofth ideas:
1. Implement a functional field within the parent (pricelist) model
trying to extract products which are related to this pricelist
1.1. through navigaiton
1.2 using domains
2. make a direct relation again to the child of the child field
to have something in the main Treeview to add "select=1" to it :) .
just because the feather of search child fields is not available !
sounds not logical.
i found an internal mechanism used by Tryton to hide search in
Treeview when we are using it not as a main Treeview, But as child
Treeview within the main Fromview. this mechanism hides search fields
which is selected as a main search option during model definition
( for instance fields.char("sample", select="1") ).
The idea of implementing this mechanism is obvious. It exist because
we need to have a nice user interface, and search within child fields
is not necessary in many situation. but according to some developments
it looks critical.
Therefore this mechanism (to hide searchbox above child treeview
within form view) should exist, but we have to take control of it.
I think perhaps that might be a good idea to have a control of search
within child fields as it looks some simple change within the core to
allow them to be visible in GUI.
Actually i was able to demonstrate search within child fields in child
tree view but always client crashes on it. i think there was a
function to hide it and all we have to do is to implement an attribute
to have a control of this function. Something like this in our form
view
<field contract_line>
<tree name="product within contract search_visible="1"
<field product select="1"/>
<field netprice/>
<field percentage/>
</tree>
<field>
As i couldn't find any formal procedure to implement it, I'm looking
forward to hear your view on that to have a better understanding of my
direction.
Regards,
--
[email protected] mailing list