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'. -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- 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/20170905180326.GG21010%40kei.
