Shravy
Shravy

Reputation: 666

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

I am kind of newbie to python and odoo and am getting invalid syntax error in the following line of code

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

Can anyone please kindly help me?

Upvotes: 2

Views: 190

Answers (1)

forvas
forvas

Reputation: 10179

You must use quotes around Meeting Invitation and you should pass the context as a parameter to the search method:

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

Upvotes: 2

Related Questions