On Tue, Sep 5, 2017 at 2:35 PM, Cédric Krier <[email protected]> wrote:
> On 2017-08-23 16:02, Khurram Shahzad wrote:
> > Hi all,
> >
> > I want to display the appointments of currently logged in user. For this
> I
> > wrote following record in the view.xml:
> >
> > <field name="domain" eval="[('healthprof.name.internal_user.id', '=',
> Eval('
> > user.id'))]" pyson="1"/>
>
> You can not use dot notation inside Eval.
> I guess you want to have the user id from the context so you must use:
>
> Eval('context', {}).get('user')
>
I tried it as follows:
<field name="domain" eval="[('doctor_id.name.internal_user.id', '=',
Eval('context',{}).get('user'))]" pyson="1"/>
But, it failed with following exception:
Invalid input syntax for integer: "" at character 1406.
When I checked query in the postgreSQL log, I found "d"."id" = '' where
"d" is alias for res_user table.
Thank you very much for the response.
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/CAM3N3CxCz_TYZeLtu3VTfJVgwqF%3D-pQc6EgFSpaTZU6Cnj%3Dydg%40mail.gmail.com.