Help to configure notification email

Hi,

I need help to configure notification email. At the moment I have follow these steps:

  1. Create a sale report in HTML format for model sale.sale
  2. Create a new Notification Email record
  3. In content select the sale report created.
  4. Recipients select Party (party.party)
  5. In attachments select Sale Report (create in sale module)
  6. Create a trigger under with the follow info:
    • Name: Sale confirmed
    • Model: Sale
    • On Create: True
    • condition: true
    • Limit number: 25
    • Minimum delay 00:30
    • Action: Email Notification

At these point works fine when a new sale is created.

I need help with the condition of the trigger because I only want trigger is called when the follow condition is true:

Eval(‘self’, {}).get(‘state’) == ‘confirmed’

I tried to update the trigger with On Write: True and write the condition above but always the condition is invalid.

Thanks in advance.

I guess you are using the web client. Indeed it is missing the Eval.get function so you have to type: Equal(Get(Eval("self", {}), "state", ""), "confirmed").

1 Like

Thanks, the suggested conditions works!

I can not use the same condition on tryton version 5.6.4 neither sao.

You can not use all the syntax sugar on the web client because Javascript does not allow overloading operators. But both clients reformat the PYSON in the same standardized syntax.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.