Odoo Help


how to create parameter in cr.execute in python for openerp

on 4/17/14, 6:24 AM 5,775 views

i want to create 'select query' in cr.execte with string parameter and how to pass the parameter to return statement in python for openerp


Jagdish Panchal

--Jagdish Panchal--
Jagdish Panchal
| 5 4 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 4/17/14, 6:51 AM


cr.execute('select id from table_name where your_field=%s ', (patamerter1,))


Fongoh Tayong
On 1/28/16, 8:07 AM

or in using self.env.cr.execute, you can do 

self.env.cr.execute("DELETE from account_invoice_summary where invoice_id = %d" % (self.id))

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/17/14, 6:24 AM
Seen: 5775 times
Last updated: 1/28/16, 8:07 AM