On Tue, Sep 5, 2017 at 11:03 PM, Cédric Krier <[email protected]> wrote:
> On 2017-09-05 22:11, Khurram Shahzad wrote: > > 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. > > Indeed the key is '_user' not 'user'. > > Great! It's working now! -- 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/CAM3N3CyC0h7d84bGHQb9N2P%3DrAKgWqM3ms7AiZZe_fZsSZbZMQ%40mail.gmail.com.
