Dear Sergi,

On Tue, Feb 6, 2018 at 3:33 PM, Sergi Almacellas Abellana <se...@koolpi.com>
wrote:

> El 06/02/18 a les 11:11, Khurram Shahzad ha escrit:
> > Hi all,
> >
> > We have received a pretty strange but sensible requirement regarding
> > searching in Products from our warehouse/procurement department. I will
> > try to explain it using an example.
> >
> > We have defined a product category being 'Paper for printing' and
> > defined following products in it:
> >
> > Paper A4
> > A5
> > A6 Paper
> > Legal Size Paper
> > Paper Executive Size
> >
> > Now while searching, if they enter 'A5', they should be able to see all
> > products whose name match with 'A5' and also those products whose
> > product category matches with product 'A5' category. Thus they will be
> > able to select from the list of all 5 products mentioned above and they
> > typed anyone of those.
>
> You should override the rec_name searcher on the product model to
> include also the name from the products of the same category. Haven't
> tested but this can be done with a domain like:
>
> [('categories.product.rec_name',) + tuple(clause[1:])]
>

Thank you so much for the prompt response. But, is 'categories' filed
defined in product? Or it is sort of implicit field available?

>
> Hope it helps.
>
>
Regards,
Khurram.

-- 
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/CAM3N3Cyw%2B_G3tJeEQ6TzcmJRrZpMFmYWSggpMoGGRVyogpzWSQ%40mail.gmail.com.

Reply via email to