El 10/03/16 a les 03:04, Carlos Ibrahim Arias ha escrit:
> Hi Narashimha,
>
> I'm having the same problem and can't make it work. I'm trying to filter
> a view with the following code using 'domain' and PYSON with no success.
>
> <record model="ir.action.act_window.domain"
> id="act_gnuhealth_appointment_domain_today">
> <field name="name">Today</field>
> <field name="sequence" eval="10"/>
> <field name="domain">[('appointment_date', '>=',
> PYSONEncoder().encode(DateTime()))]</field>
> <field name="act_window"
> ref="action_gnuhealth_appointment_view"/>
> </record>
>
You should not encode Datetime in PYSONEncoder. And use it directly. For
example:
<field name="domain">[('appointment_date', '>=',DateTime(hour=0,
minute=0, second=0, microsecond=0))]</field>
> Can you post you solution using PYSON?
>
> Thanks in advanced.
>
> Carlos
>
> El lunes, 14 de octubre de 2013, 21:22:06 (UTC+1), Narasimha Murthy
> escribió:
>
> Hi,
> I want to create a invoice view to show all the invoices pending for
> today only.
> Can i use domain in xml to filter?how do i use domain.
> domain('invoice_date',Eval(
> 'datetime.date.today()')) is correct?
> I am trying with XML view instead of writing own method.
> Thanks,
> Murthy
>
> --
> 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/27f6ad87-d8ee-4df6-899d-f2d1d4118390%40googlegroups.com
> <
https://groups.google.com/d/msgid/tryton/27f6ad87-d8ee-4df6-899d-f2d1d4118390%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk