Odoo 中这行代码的语法错误是什么

What is the syntax error in this line of code in Odoo

我是 python 和 odoo 的新手,在下面的代码行中遇到无效语法错误

template_id = self.pool.get('email.template').search(cr, uid, [('name','=ilike',Meeting Invitation)])

谁能帮帮我?

您必须在 Meeting Invitation 周围使用引号并且您应该将 context 作为参数传递给 search 方法:

template_id = self.pool.get('email.template').search(cr, uid, [('name', '=ilike', 'Meeting Invitation')], context)