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

I'm working in a project with php and mysql database. and I want that with odoo I can add or update data

An exemple :

-When I add a project in odoo this project will addded in my own project.

I try this code 

_________________________________________

def connexion ():
    db = mysql.connect(host = "localhost",
    user = "root",
    passwd = "",
    database = "test",
    port =int(3306)
    )
    return db

_________________________________________

when I call this function here (when I add a project in odoo )

_________________________________________

@api.model
def create(self, vals):
    db =connexion()
    return super(ProjectProject, self).create(vals) 

_________________________________________

odoo show me this error 

_________________________________________

raise exception.with_traceback(None) from new_cause
mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'http://127.0.0.1:3306' (-2 Name or service not known)


can someone help me here with exemples  


아바타
취소
관련 게시물 답글 화면 활동
4
1월 20
26274
1
1월 18
5205
0
7월 25
1457
2
11월 24
6285
2
10월 24
3303