user3153567
user3153567

Reputation: 157

New server action creation with condition

I have defined server action to trigger email only if state='tied'. However right now system send email soon after creating record with state = 'new'. Please throw some light on this issue

Basically I need to trigger email ,only if state is equal to tied.

  'state': fields.selection([
                ('new','New'),
                ('starts','Starts'),
                ('progress','Progress'),
                ('won','Won'),
                ('lost','Lost'), ('tied','Tied')], 'Stage',readonly=True),

enter image description here

Upvotes: 1

Views: 227

Answers (1)

CZoellner
CZoellner

Reputation: 14801

the condition should be: obj.state == 'tied'

Upvotes: 0

Related Questions