콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
758 화면

Hello,

I am new to Odoo ... I have to receive data via MQTT and then write them into database. MQQT part works. I use on_message callback to receive data. I also have to check if some keys are present in the database and if they present, to store received data. 

However, trying to execute operators like this

work_order = env['mrp.workorder'].search([('id', '=', widint)])

I receive 

psycopg2.InterfaceError: Cursor already closed

I realize that I have no access to the database some way... My questions are how to open/connect to database to do execute above search and eventually writing some data into the database. on_message() function is called by paho-mqtt module in separate thread.


Ivan






아바타
취소