带条件的新服务器操作创建

时间:2014-03-03 14:49:22

标签: openerp

我已定义服务器操作以仅在state ='tied'时触发电子邮件。 但是现在系统在创建state ='new'的记录后很快就会发送电子邮件。请详细说明这个问题

基本上我需要触发电子邮件,只要状态等于绑定。

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

enter image description here

1 个答案:

答案 0 :(得分:0)

条件应为:obj.state == 'tied'

相关问题