Odoo Help

Welcome!

This community 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.

0

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

By
kalyan
on 4/17/14, 6:24 AM 5,228 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

1

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

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

Hi,,

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

Thanks

0
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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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