On 18/10/12 11:27 +0200, Raimon Esteve wrote:
> Hello,
> 
> 
> I don't know if is a bug or I don't understood well.....
> 
> In XML menus, we can filter by date:
> 
>         <record model="ir.action.act_window" id="act_sale_form">
>             <field name="name">Sales</field>
>             <field name="res_model">sale.sale</field>
>             <field name="search_value">[('create_date', '>=',
> DateTime(hour=0, minute=0, second=0, microsecond=0,
> delta_years=-1))]</field>
>         </record>
> 
> In search form GTK client it return this date a year ago:
> 
> "Create Date": >10/18/2011
> 
> I think need to return today. Or not? Or why a year and not a month?

Because delta_years=-1
See
http://doc.tryton.org/2.4/trytond/doc/ref/pyson.html?highlight=datetime#trytond.pyson.DateTime

-- 
Cédric Krier

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

Attachment: pgpHa3bRqnnXE.pgp
Description: PGP signature

Reply via email to