On 22/01/10 12:31 +0100, Cédric Krier wrote:
> On 11/01/10 20:10 +0100, Cédric Krier wrote:
> > Hi,
> > 
> > I would like to discuss about the search criteria on window actions.
> > 
> > First, for those who don't know what is search criteria, it is default value
> > that can be set in the client when openning a new tab. It is like the domain
> > except that they are visible (the search widgets are filled) and they are
> > editable. (There is no example currently in standard modules)
> > 
> > I think it could be good to have it filled in standard modules like sale,
> > purchase, account_invoice etc. Because they have models that will grow with
> > time and they can become annoying when working with a lot of records by
> > default.
> > 
> > So I propose to add a default search criteria on those actions like this one
> > for invoice:
> > 
> > {'invoice_date': ['between', datetime.date.today() - 
> > datetime.timedelta(days=365)]}
> > 
> 
> I have made some tests. I found that we can not use the invoice_date
> because the field is not required, So with this kind "domain", we will miss
> invoices without invoice_date.
> This is also available for effective_date of shipments etc.
> 
> Instead I propose to use the create_date like this:
> 
> {'create_date': ['between', Date(delta_years=-1)]}
> 
> And add the create_date in the tree view like this (it will be visible in
> "Advanced Search"):
> 
> <field name="create_date" tree_invisible="1" select="2"/>
> 
> And I will add an index on create_date to have good performance.


It is done on modules: account, account_invoice, purchase, sale, stock and
stock_forecast

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email: [email protected]
Jabber: [email protected]
Website: http://www.b2ck.com/
twitter: http://twitter.com/cedrickrier
identi.ca: http://identi.ca/cedrickrier

Attachment: pgp3FqWvGMG2A.pgp
Description: PGP signature

Reply via email to