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

ODOO: openerp.http: Exception during JSON request handling.

By
Drees Far
on 12/15/15, 4:16 AM 820 views

Hello!!!

I am working with odoo9 and trying sql query.

Here is what i have tried:

@api.multi

def open_something(self):

sql = self.env.cr.execute("SELECT name,model_id, res_id, user_id, method, field_id, old_value, new_value, old_value_text, new_value_text FROM auditlog_log_line LEFT JOIN auditlog_log ON auditlog_log_line.id = auditlog_log.id;")

self.deadline = self.env.cr.fetchone()[0]

result = self.deadline

self.env.cr.execute("INSERT INTO seetek_request (name) VALUES ("+result+")")

And here is what i have got as error:

2015-12-15 09:11:47,277 6560 INFO seetek openerp.sql_db: Programming error: syntax error at or near "Langlais"

LIGNE 1 : INSERT INTO seetek_request (name) VALUES (Antoine Langlais)

^

, in query INSERT INTO seetek_request (name) VALUES (Antoine Langlais)

2015-12-15 09:11:47,277 6560 ERROR seetek openerp.http: Exception during JSON request handling.

 Can anyone help please.

Thanks a lot in advance.

Best Regards.

0

Pawan

--Pawan--
1267
| 4 3 5
Hyderabad, India
--Pawan--


Pawan
On 12/16/15, 3:30 AM

Drees,

Please modify your insert query as:

"INSERT INTO seetek_request (name) VALUES ('"+result+"')")

Hope it helps

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: 12/15/15, 4:16 AM
Seen: 820 times
Last updated: 1/18/16, 3:23 PM