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.

1

how to insert into postgress sql directly from python code?

By
aneesh ATEES Infomedia Pvt Ltd
on 8/29/16, 4:58 AM 193 views

hi,

i want to insert values from my website to postgress sql database ...i want to know which method is used for insertion?

1

Hilar AK

--Hilar AK--
838
| 4 1 7
Italy
--Hilar AK--


Hilar AK
On 11/24/16, 1:12 AM

eg:

cr.execute('select * from res_partner')
fetch =  cr.dictfetchall() or cr.fetchall()

or you can simply execute as

query = "your query"
cr.execute(query)



1
yousif Mobark
On 8/30/16, 3:22 AM

use execute method

 cr.execute(sql_statment)


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

1 follower(s)

Stats

Asked: 8/29/16, 4:58 AM
Seen: 193 times
Last updated: 11/24/16, 1:12 AM