[Erp5-dev] using ComplexQuery and choosing proper tables
    Łukasz Nowak 
    email at lnowak.com
       
    Wed Nov  5 09:27:19 CET 2008
    
    
  
Hello
On Tue, 2008-11-04 at 17:26 +0100, Romain Courteaud wrote:
> * Łukasz Nowak [2008-11-04 16:52:27 +0100]:
> 
> > Hello,
> 
> Hello,
> 
> > Take a look at this snippet:
> > 
> > kw = {}
> > from Products.ZSQLCatalog.SQLCatalog import Query,ComplexQuery
> > query = ComplexQuery(
> >   Query(**{'movement.start_date' : '>=2008/10/10'}),
> >   Query(**{'movement.start_date' : '<=2008/10/10'}),
> > )
> > kw.update(**query.asSQLExpression())
> > context.portal_catalog(**kw)
> 
> Did you try ?
>   
>   context.portal_catalog(query=query)
No...Count to 5.
Yes! Phew - sometimes I do not see the simplest solution :) Thanks! :)
Regards,
Luke
-- 
Łukasz Nowak IT Specialist email at lnowak.com http://lnowak.com/
Skype: Shufla jid: shufla at jabster.pl
``Use the Source, Luke...''
    
    
More information about the Erp5-dev
mailing list