<commit_before>from flask import Flask
from flask_bootstrap import Bootstrap
from flask import render_template
import bootstrap
import xmlrpclib
from io import BytesIO
import base64

app = Flask(__name__)

import xmlrpclib



username = 'admin' #the user
pwd = '<PASSWORD>'      #the password of the user
dbname = 'ctpug'    #the database

sock_common = xmlrpclib.ServerProxy ('http://172.16.17.32:8269/xmlrpc/common')
uid = sock_common.login(dbname, username, pwd)

#replace localhost with the address of the server
sock = xmlrpclib.ServerProxy('http://172.16.17.32:8269/xmlrpc/object')


	
def test_connection(username,pwd,dbname):
	connection_reply = 'Connection to Odoo - '
	args = [] #query clause
	ids = sock.execute(dbname, uid, pwd, 'res.partner', 'search', args)

	fields = ['name', 'id', 'email'] #fields to read
	data = sock.execute(dbname, uid, pwd, 'res.partner', 'read', ids, fields)

	if data[0].name == 'admin':
		connection_reply + 'successful'
	else:
		connection_reply + 'not successful'
	return connection_reply<commit_msg>Added currency looked based on your own company and list price, with removal of creds<commit_after>from flask import Flask
from flask_bootstrap import Bootstrap
from flask import render_template
import bootstrap
import xmlrpclib
from io import BytesIO
import base64

app = Flask(__name__)

import xmlrpclib

username = 'username' #the user
pwd = 'password'      #the password of the user
dbname = 'ctpug'    #the database

sock_common = xmlrpclib.ServerProxy ('http://127.0.0.1:8069/xmlrpc/common')
uid = sock_common.login(dbname, username, pwd)

#replace localhost with the address of the server
sock = xmlrpclib.ServerProxy('http://127.0.0.1:8069/xmlrpc/object')


	
def test_connection(username,pwd,dbname):
	connection_reply = 'Connection to Odoo - '
	args = [] #query clause
	ids = sock.execute(dbname, uid, pwd, 'res.partner', 'search', args)

	fields = ['name', 'id', 'email'] #fields to read
	data = sock.execute(dbname, uid, pwd, 'res.partner', 'read', ids, fields)

	if data[0].name == 'admin':
		connection_reply + 'successful'
	else:
		connection_reply + 'not successful'
	return connection_reply
{'fraction_non_alphanumeric': 0.11668991166899116, 'fraction_numerical': 0.02417480241748024, 'mean_word_length': 4.994428969359332, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7613354', 'n_tokens_mistral': 750, 'n_tokens_neox': 701, 'n_words': 213}