2015-07-13 13:21 GMT+02:00 Cédric Krier <[email protected]>:
> On 2015-07-13 03:41, E. Boer wrote:
>> What I did was to make the PYSON-statement and then used the PYSON-encoder
>> to encode it into some JSON and add that in the condition field.
>
> Yes we are still missing a text/char widget on the client side to
> encode/decode PYSON statement.
ok.
But without widget, an example about condition trigger?
I try and I get error:
Eval('self').get('name') == 'Bar'
Also I debug env content and self in env is a empty dict when
EvalEnvironment(record, record.__class__)
record: party.party,2
record class: <class 'trytond.pool.party.party'>
env values:
{'current_date': datetime.datetime(2015, 7, 13, 11, 35, 37, 391614),
'self': {}, 'context': {'date_format': '%d/%m/%Y', 'language':
'ca_ES', 'locale': {'date': '%d/%m/%Y', 'thousands_sep': ' ',
'decimal_point': ',', 'grouping': [3, 3, 0]}, 'language_direction':
'ltr', '_check_access': True, 'company.rec_name': 'zz', 'groups': [1,
5, 2, 9, 3, 7, 6, 4, 8], 'employee': None, 'company': 1}, 'time':
<module 'time' (built-in)>}
Thanks