Email template if condition in odoo

Viewed 3133

I done code for email template.I need to check amout value in if condition which is greater or not,but sign ">" does not work.

My code is here:

  % if object.amount > 12:
       #some code
  % endif

I also tried this.

  % if object.amount &gt 12:
       #some code
  % endif

how to apply ">" operator in if condition ?

2 Answers

A lightweighted approach, that also works, without the need for a separate function:

% if (min(object.amount,12) == 12) and (object.amount != 12):
    #some code
% endif
Related