Odoo Help

1

how to insert into postgress sql directly from python code?

By
aneesh ATEES Infomedia Pvt Ltd
on 8/29/16, 4:58 AM 263 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

--Hilar--
Hilar
1245
| 5 3 8
Rome, Italy
--Hilar--
  Blog:-
        https://hilarlive.wordpress.com/
Hilar
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 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.

Register

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

1 follower(s)

Stats

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