[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Health] Record Rules
From: |
Cédric Krier |
Subject: |
Re: [Health] Record Rules |
Date: |
Mon, 30 May 2016 08:53:49 +0200 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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/