|
From: | Khurram Shahzad |
Subject: | Re: [Health] Record Rules |
Date: | Tue, 31 May 2016 09:55:56 +0500 |
On 2016-05-30 09:01, Khurram Shahzad wrote:
> Dear Cedric,
>
> Thanks a lot. I worked like a magic.
>
> Can I further bother you by asking how can I refine this rule so that
> instead of hard-coding the id of the health professional, it picks the id
> of currently logged in user, finds the corresponding Party and then the
> Health Professional for the condition?
You can use the PYSON.Eval [1] in the _expression_. You will have by
default access to the current 'user' object.
Don't forget that the Eval statement must also by jsonified.
[1] http://doc.tryton.org/4.0/trytond/doc/ref/pyson.html#trytond.pyson.Eval
--
Cédric Krier - B2CK SPRL
Email/Jabber: address@hidden
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
[Prev in Thread] | Current Thread | [Next in Thread] |