Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
17972 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

Hi,,

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

Thanks

Avatar
Zrušit
Nejlepší odpověď

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))
Avatar
Zrušit