This commit is contained in:
manager 2024-02-20 16:45:01 +01:00
parent fac3decec4
commit 5f8538d251
30 changed files with 31293 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@ -0,0 +1,9 @@
#!/bin/sh
#xrandr --newmode "1280x1024_60.00" 108.88 1280 1360 1496 1712 1024 1025 1028 1060 -HSync +Vsync
#xrandr --addmode VGA-0 1280x1024_60.00
#xrandr --output VGA-0 --mode 1280x1024_60.00
xrandr --newmode "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
xrandr --addmode VGA-0 1920x1080_60.00
xrandr --output VGA-0 --mode 1920x1080_60.00

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

View File

@ -0,0 +1,41 @@
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#Plot styling
import seaborn as sns; sns.set() # for plot styling
plt.rcParams['figure.figsize'] = (16, 9)
plt.style.use('ggplot')#Read the csv file
dataset=pd.read_csv('CLV.csv')#Explore the dataset
dataset.head()#top 5 columns
len(dataset) # of rows#descriptive statistics of the dataset
dataset.describe().transpose()
#Using the elbow method to find the optimum number of clusters
from sklearn.cluster import KMeans
wcss = []
for i in range(1,11):
km=KMeans(n_clusters=i,init='k-means++', max_iter=300, n_init=10, random_state=0)
km.fit(X)
wcss.append(km.inertia_)
plt.plot(range(1,11),wcss)
plt.title('Elbow Method')
plt.xlabel('Number of clusters')
plt.ylabel('wcss')
plt.show()
##Fitting kmeans to the dataset with k=4
km4=KMeans(n_clusters=4,init='k-means++', max_iter=300, n_init=10, random_state=0)
y_means = km4.fit_predict(X)#Visualizing the clusters for k=4
plt.scatter(X[y_means==0,0],X[y_means==0,1],s=50, c='purple',label='Cluster1')
plt.scatter(X[y_means==1,0],X[y_means==1,1],s=50, c='blue',label='Cluster2')
plt.scatter(X[y_means==2,0],X[y_means==2,1],s=50, c='green',label='Cluster3')
plt.scatter(X[y_means==3,0],X[y_means==3,1],s=50, c='cyan',label='Cluster4')plt.scatter(km4.cluster_centers_[:,0], km4.cluster_centers_[:,1],s=200,marker='s', c='red', alpha=0.7, label='Centroids')
plt.title('Customer segments')
plt.xlabel('Annual income of customer')
plt.ylabel('Annual spend from customer on site')
plt.legend()
plt.show()

View File

@ -0,0 +1,101 @@
<map version="freeplane 1.7.0">
<!--To view this file, download free mind mapping software Freeplane from http://freeplane.sourceforge.net -->
<node TEXT="keywords" FOLDED="false" ID="ID_1686017584" CREATED="1581075230684" MODIFIED="1581076215041" STYLE="oval">
<font SIZE="18"/>
<hook NAME="MapStyle">
<properties edgeColorConfiguration="#808080ff,#ff0000ff,#0000ffff,#00ff00ff,#ff00ffff,#00ffffff,#7c0000ff,#00007cff,#007c00ff,#7c007cff,#007c7cff,#7c7c00ff" fit_to_viewport="false"/>
<map_styles>
<stylenode LOCALIZED_TEXT="styles.root_node" STYLE="oval" UNIFORM_SHAPE="true" VGAP_QUANTITY="24.0 pt">
<font SIZE="24"/>
<stylenode LOCALIZED_TEXT="styles.predefined" POSITION="right" STYLE="bubble">
<stylenode LOCALIZED_TEXT="default" ICON_SIZE="12.0 pt" COLOR="#000000" STYLE="fork">
<font NAME="SansSerif" SIZE="10" BOLD="false" ITALIC="false"/>
</stylenode>
<stylenode LOCALIZED_TEXT="defaultstyle.details"/>
<stylenode LOCALIZED_TEXT="defaultstyle.attributes">
<font SIZE="9"/>
</stylenode>
<stylenode LOCALIZED_TEXT="defaultstyle.note" COLOR="#000000" BACKGROUND_COLOR="#ffffff" TEXT_ALIGN="LEFT"/>
<stylenode LOCALIZED_TEXT="defaultstyle.floating">
<edge STYLE="hide_edge"/>
<cloud COLOR="#f0f0f0" SHAPE="ROUND_RECT"/>
</stylenode>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.user-defined" POSITION="right" STYLE="bubble">
<stylenode LOCALIZED_TEXT="styles.topic" COLOR="#18898b" STYLE="fork">
<font NAME="Liberation Sans" SIZE="10" BOLD="true"/>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.subtopic" COLOR="#cc3300" STYLE="fork">
<font NAME="Liberation Sans" SIZE="10" BOLD="true"/>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.subsubtopic" COLOR="#669900">
<font NAME="Liberation Sans" SIZE="10" BOLD="true"/>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.important">
<icon BUILTIN="yes"/>
</stylenode>
</stylenode>
<stylenode LOCALIZED_TEXT="styles.AutomaticLayout" POSITION="right" STYLE="bubble">
<stylenode LOCALIZED_TEXT="AutomaticLayout.level.root" COLOR="#000000" STYLE="oval" SHAPE_HORIZONTAL_MARGIN="10.0 pt" SHAPE_VERTICAL_MARGIN="10.0 pt">
<font SIZE="18"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,1" COLOR="#0033ff">
<font SIZE="16"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,2" COLOR="#00b439">
<font SIZE="14"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,3" COLOR="#990000">
<font SIZE="12"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,4" COLOR="#111111">
<font SIZE="10"/>
</stylenode>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,5"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,6"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,7"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,8"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,9"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,10"/>
<stylenode LOCALIZED_TEXT="AutomaticLayout.level,11"/>
</stylenode>
</stylenode>
</map_styles>
</hook>
<hook NAME="AutomaticEdgeColor" COUNTER="7" RULE="ON_BRANCH_CREATION"/>
<node TEXT="voyages en groupes" POSITION="right" ID="ID_1827253318" CREATED="1581075344448" MODIFIED="1581075353428">
<edge COLOR="#ff0000"/>
<node TEXT="voyager &#xe0; plusieurs" ID="ID_265351755" CREATED="1581075376583" MODIFIED="1581075394258"/>
<node TEXT="voyager ensemble" ID="ID_15204877" CREATED="1581075394816" MODIFIED="1581075410595"/>
<node TEXT="rejoindre un groupe" ID="ID_378691396" CREATED="1581075411112" MODIFIED="1581075457515"/>
<node TEXT="autocar" ID="ID_742172404" CREATED="1581075457960" MODIFIED="1581075518162"/>
<node TEXT="groupe d&apos;amis" ID="ID_756389146" CREATED="1581075595807" MODIFIED="1581075601114"/>
<node TEXT="circuit en groupe" ID="ID_362727029" CREATED="1581075859630" MODIFIED="1581075868601"/>
</node>
<node TEXT="circuits" POSITION="right" ID="ID_787878174" CREATED="1581075353799" MODIFIED="1581076147335" HGAP_QUANTITY="13.250000022351742 pt" VSHIFT_QUANTITY="50.24999850243334 pt">
<edge COLOR="#0000ff"/>
<node TEXT="voyages en circuits organis&#xe9;s" ID="ID_576749846" CREATED="1581083998951" MODIFIED="1581088347880"/>
<node TEXT="go voyages circuits" ID="ID_809433101" CREATED="1581084000552" MODIFIED="1581088306527"/>
<node TEXT="voyage circuits pas cher" ID="ID_1813275909" CREATED="1581084001607" MODIFIED="1581088324681"/>
<node TEXT="jours" ID="ID_174791421" CREATED="1581084002519" MODIFIED="1581088417128"/>
<node TEXT="semaines" ID="ID_690627631" CREATED="1581088417309" MODIFIED="1581088421184"/>
</node>
<node TEXT="weekend" POSITION="right" ID="ID_919478178" CREATED="1581075363312" MODIFIED="1581076189728" HGAP_QUANTITY="-272.49999146163486 pt" VSHIFT_QUANTITY="-29.999999105930353 pt">
<edge COLOR="#00ff00"/>
</node>
<node TEXT="tour" POSITION="right" ID="ID_655558420" CREATED="1581075368496" MODIFIED="1581076215039" HGAP_QUANTITY="-213.9999932050707 pt" VSHIFT_QUANTITY="61.49999816715723 pt">
<edge COLOR="#ff00ff"/>
<node TEXT="" ID="ID_1848858881" CREATED="1581088453638" MODIFIED="1581088453638"/>
</node>
<node TEXT="" POSITION="right" ID="ID_1729934090" CREATED="1581075611959" MODIFIED="1581075611960">
<edge COLOR="#00ffff"/>
</node>
<node TEXT="" POSITION="left" ID="ID_1826758161" CREATED="1581076106933" MODIFIED="1581076158264" HGAP_QUANTITY="80.74999801069504 pt" VSHIFT_QUANTITY="-125.99999624490749 pt">
<edge COLOR="#7c0000"/>
</node>
<node TEXT="" POSITION="left" ID="ID_739483702" CREATED="1581076194836" MODIFIED="1581076204103" HGAP_QUANTITY="88.99999776482589 pt" VSHIFT_QUANTITY="-78.74999765306718 pt">
<edge COLOR="#00007c"/>
</node>
</node>
</map>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
,dev1,dev1.alloa,29.07.2021 15:24,file:///home/dev1/.config/libreoffice/4;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,446 @@
# -*- coding: utf-8 -*-
from storm.locals import *
import uuid
import sys
import datetime
from time import gmtime, mktime
sys.path.append("../storm/")
from StormClass import *
db_new = create_database("postgres://michel:8888sm@10.0.3.7:5432/dbpgalloa")
store_new = Store(db_new)
db_old = create_database("postgres://michel:8888sm@10.0.3.7:5432/alloadb")
store_old = Store(db_old)
def remplir_entete(classe, table):
classe.z_nomtable = unicode(table)
classe.z_semaphore = u"FREE"
classe.z_datecreation = mktime(gmtime())
classe.z_datemodification = classe.z_datecreation
classe.z_dernier_temps_modif = u"0"
classe.z_groupecreateur = u"root:root"
classe.z_encourstraitement = False
classe.z_datearevoirle = datetime.date(1970, 1, 1)
classe.z_nombreimport = 0
classe.z_modification = False
classe.z_localesvn = int(datetime.datetime.now().strftime("%y%m%d%H%M%S"))
classe.z_raisonrefus = u""
classe.z_historique = u"root:" + datetime.datetime.now().strftime("%y%m%d%H%M%S") + ";"
#################################################################################################
def stripANous(champs):
if champs == None:
return u""
else:
return unicode(champs.strip())
def export_continents():
global store_old, store_new
res = store_old.execute("select * from cartographie.continents")
for cont in res:
new = Continent()
new.uuidcontinents = unicode(uuid.uuid4())
new.frlibcontinent = cont[2]
new.gblibcontinent = cont[3]
new.refcontinents = cont[1]
new.refalaune = cont[16]
new.refbaniere = cont[17]
new.frdesccontinents = cont[18]
new.gbdesccontinents = cont[19]
new.ispublique = True
new.is_thematique = False
remplir_entete(new, "Continent")
store_new.add(new)
def export_pays():
global store_old, store_new
res = store_old.execute("select * from cartographie.pays")
uuiddevise = store_new.find(Ogdevise).one().uuidogdevise
for pays in res:
new = Pays()
new.uuidpays = unicode(uuid.uuid4())
new.refpays = pays[1] + u"-"
new.frlibpays = stripANous(pays[2])
new.gblibpays = stripANous(pays[3])
new.frdescpays = stripANous(pays[4])
new.gbdescpays = stripANous(pays[5])
new.codedevise = stripANous(pays[6])
new.lattitude_depart = stripANous(pays[7])
new.longitude_depart = stripANous(pays[8])
new.lattitude_arrivee = stripANous(pays[9])
new.longitude_arrivee = stripANous(pays[10])
if pays[24].strip() == "5":
new.refcontinents = u"12"
else : new.refcontinents = stripANous(pays[24])
new.uuidogdevise = uuiddevise
new.is_cee = False
new.is_asean = False
new.is_dangerous = False
new.is_commonewealth = False
new.ispublique = True
new.is_thematique = False
new.codeiso = stripANous(pays[1])
remplir_entete(new, "Pays")
store_new.add(new)
def export_region():
global store_old, store_new
res = store_old.execute("select * from cartographie.region")
for cont in res:
new = Region2()
new.refregion = stripANous(cont[0])
new.uuidregion = unicode(uuid.uuid4())
new.frlibregion = stripANous(cont[2])
new.gblibregion = stripANous(cont[3])
new.frdescregion = u""
new.gbdescregion = u""
new.frarguments = u""
new.gbarguments = u""
new.frclimat = u""
new.gbclimat = u""
new.frsante = u""
new.gbsante = u""
new.fraccroche = u""
new.gbaccroche = u""
new.fra_voir_avivre = u""
new.gba_voir_avivre = u""
new.frcuisine = u""
new.gbcuisine = u""
new.frshopping = u""
new.gbshopping = u""
new.janvier = False
new.fevrier = False
new.mars = False
new.avril = False
new.mai = False
new.juin = False
new.juillet = False
new.aout = False
new.septembre = False
new.octobre = False
new.novembre = False
new.decembre = False
new.note_privee = u""
new.refmageaccroche = u""
new.lattitude_depart = u""
new.longitude_depart = u""
new.lattitude_arrivee = u""
new.longitude_arrivee = u""
new.principauxgatteways = u""
new.ispublique = True
tmp = store_new.find(Pays, Pays.refpays == stripANous(cont[39]) + u"-").one()
if (tmp != None):
new.refpays = stripANous(tmp.refpays)
else :
new.refpays = u"Z9"
new.is_thematique = False
remplir_entete(new, "Region")
store_new.add(new)
def export_destination():
global store_old, store_new
res = store_old.execute("select * from cartographie.destination")
compteur = 0
for dest in res:
new = Region2()
new.uuidregion = unicode(uuid.uuid4())
new.frlibregion = stripANous(dest[1])
new.gblibregion = stripANous(dest[2])
new.frdescregion = u""
new.gbdescregion = u""
new.frarguments = u""
new.gbarguments = u""
new.frclimat = u""
new.gbclimat = u""
new.frsante = u""
new.gbsante = u""
new.fraccroche = u""
new.gbaccroche = u""
new.fra_voir_avivre = u""
new.gba_voir_avivre = u""
new.frcuisine = u""
new.gbcuisine = u""
new.frshopping = u""
new.gbshopping = u""
new.janvier = False
new.fevrier = False
new.mars = False
new.avril = False
new.mai = False
new.juin = False
new.juillet = False
new.aout = False
new.septembre = False
new.octobre = False
new.novembre = False
new.decembre = False
new.note_privee = u""
new.refmageaccroche = u""
new.lattitude_depart = u""
new.longitude_depart = u""
new.lattitude_arrivee = u""
new.longitude_arrivee = u""
new.principauxgatteways = u""
new.ispublique = True
tmp = store_new.find(Region, Region.refregion == stripANous(dest[0])).one()
if tmp != None:
new.refregion = u"zzz%s" % compteur
else:
new.refregion = stripANous(dest[0])
compteur += 1
tmp = store_new.find(Pays, Pays.refpays == stripANous(dest[0])[0:3]).one()
if (tmp != None):
new.refpays = stripANous(tmp.refpays)
else :
new.refpays = u"Z9"
new.is_thematique = True
remplir_entete(new, "Region")
store_new.add(new)
def export_ville():
global store_old, store_new
res = store_old.execute("select * from cartographie.ville")
cpt = 0
for ville in res:
cpt += 1
if cpt % 1000:
print cpt
new = Ville()
new.refville = stripANous(ville[0])
new.uuidville = unicode(uuid.uuid4())
new.frlibville = stripANous(ville[1])
new.gblibville = stripANous(ville[2])
new.frdescville = u""
new.gbdescville = u""
new.code_postal = u""
new.codeetat = stripANous(ville[23])
new.gateway = ville[24]
new.lattitude_depart = stripANous(ville[6])
new.longitude_depart = stripANous(ville[7])
new.lattitude_arrivee = u""
new.longitude_arrivee = u""
tmp = store_new.find(Region, Region.refregion == stripANous(ville[10])).one()
if (tmp != None):
new.refregion = stripANous(tmp.refregion)
else: new.refregion = u"bidon"
new.ispublique = True
new.codeiso = u""
remplir_entete(new, "Ville")
store_new.add(new)
def export_gateway():
global store_old, store_new
res = store_old.execute("select * from cartographie.gateway")
cpt = 0
cptaffiche = 100
for gat in res:
new = Gateway()
cpt += 1
if (cpt == cptaffiche) or (cpt == 27846):
print "%s/27846" % cpt
cptaffiche += 100
new.refgateway = stripANous(gat[1])
new.uuidgateway = unicode(uuid.uuid4())
new.codegalileo = stripANous(gat[2])
new.frlibgateway = stripANous(gat[3])
new.gblibgateway = stripANous(gat[4])
new.isfer = gat[5]
new.isroutiere = gat[6]
new.isaeroportinter = gat[7]
new.isaerodrome = gat[8]
new.isferry = gat[9]
new.isportcroisiere = gat[10]
new.isportplaisance = gat[11]
new.lattitude_depart = stripANous(gat[12])
new.longitude_depart = stripANous(gat[13])
new.lattitude_arrivee = stripANous(gat[14])
new.longitude_arrivee = stripANous(gat[15])
new.ispublique = True
remplir_entete(new, "Gateway")
store_new.add(new)
def export_z_villes_gateways():
print "créations des listes"
tmp = store_new.find(Ville, True)
listeVille = []
listeGateway = []
for cont in tmp:
listeVille.append(cont.refville)
tmp = store_new.find(Gateway, True)
for cont in tmp:
listeGateway.append(cont.refgateway)
print "bouclewhile"
cpt = 0
while len(listeGateway):
tmpgateway = listeGateway[0]
del listeGateway[0]
res = store_old.execute("select * from cartographie.z_villes_gateways where refgateway='%s'" % tmpgateway)
for cont in res:
if cont[0] in listeVille:
cpt += 1
a = Zlien_villes_gateways()
a.refville = cont[0]
a.refgateway = tmpgateway
store_new.add(a)
print "commit", cpt
store_new.commit()
"""global store_old,store_new
print "récupération de la table en cours..."
res=store_old.execute("select * from cartographie.z_villes_gateways ORDER BY refville asc limit 10000")
print "récupération terminé"
cpt=1
villeAvant=None
for lien in res:
new=Zlien_villes_gateways()
cpt+=1
if cpt%1000==0:
print "%s/12311488"%cpt
tmp1=lien[0]
tmp2=lien[1]
if villeAvant==tmp2 :
if tmp1 in listeGateway:
new.refgateway=tmp1
new.refville=tmp2
else:
continue
else:
if tmp2 in listeVille:
villeAvant=tmp2
new.refville=tmp2
new.refgateway=tmp1
else:
villeAvant=None
continue
store_new.add(new)
if cpt%150000==0:
print "commit en cour..."
store_new.commit()
print "commit terminé"
"""
def creationObjetBidon():
# ## création d'un contineent bidon
new = Continent()
new.uuidcontinents = unicode(uuid.uuid4())
new.frlibcontinent = u"Continent Bidon"
new.gblibcontinent = u"Continent bidon"
new.refcontinents = u"12"
new.refalaune = u""
new.refbaniere = u""
new.frdesccontinents = u"un très joli continent"
new.gbdesccontinents = u"a very beautiful continent"
new.ispublique = False
new.is_thematique = False
remplir_entete(new, "Continent")
store_new.add(new)
store_new.commit()
# ## création d'un pays bidon
new = Pays()
new.uuidpays = unicode(uuid.uuid4())
new.frlibpays = u"PAYS BIDON"
new.gblibpays = u"PAYS BIDON"
new.refpays = u"Z9"
new.refcontinents = u"12"
new.frdescpays = u"un très joli pays"
new.gbdescpays = u"a very beautiful pays"
new.ispublique = False
new.is_thematique = False
remplir_entete(new, "Pays")
new.uuidogdevise = store_new.find(Ogdevise).one().uuidogdevise
store_new.add(new)
store_new.commit()
### création d'une region bidon ###
new = Region()
new.refregion = u"bidon"
new.uuidregion = unicode(uuid.uuid4())
new.frlibregion = u"REGION BIDON"
new.gblibregion = u"REGION BIDON"
new.refpays = u"Z9"
new.ispublique = False
remplir_entete(new, "Region")
store_new.add(new)
store_new.commit()
### création d'une ville bidon ###
new = Ville()
new.refville = u"ZBidon"
new.refregion = u"bidon"
new.uuidville = unicode(uuid.uuid4())
new.frlibville = u"VILLE BIDON"
new.gblibville = u"VILLE BIDON"
new.ispublique = False
remplir_entete(new, "Region")
store_new.add(new)
store_new.commit()
### création d'un aéroport bidon ###
new = Gateway()
new.refgateway = u"ZZNAZ"
new.uuidgateway = unicode(uuid.uuid4())
new.frlibgateway = u"GATEWAY BIDON"
new.gblibgateway = u"GATEWAY BIDON"
new.ispublique = False
remplir_entete(new, "Gateway")
store_new.add(new)
store_new.commit()
def importerAll ():
#===============================================================================
# #===============================================================================
# # print"def export_continents():"
# # export_continents()
# # store_new.commit()
# # print"def export_pays()"
# # export_pays()
# # store_new.commit()
# # print "export_region()"
# # export_region()
# # store_new.commit()
# # print "export_destination()"
# # export_destination()
# # store_new.commit()
# #===============================================================================
# print "export_ville()"
# export_ville()
# print "commit en cours"
# store_new.commit()
#===============================================================================
#===============================================================================
# print "export_gateway()"
# export_gateway()
# store_new.commit()
#===============================================================================
print "export_z_villes_gateways():"
export_z_villes_gateways()
# creationObjetBidon()
export_region()
store_new.commit()
export_destination()
# export_z_villes_gateways()
print "commit en cour..."
store_new.commit()
print "commit terminé"
print "--terminé--"

View File

@ -0,0 +1,48 @@
#!/usr/bin/env python
import psycopg2, uuid, datetime, time
bdd_main = "dbname='alloa' user='mad' host='192.168.0.67' password='mad8888'"
bdd_local = "dbname='alloa2' user='dev' host='127.0.0.1' password='dev8888'"
db = psycopg2.connect(bdd_main)
cur = db.cursor()
newdb = psycopg2.connect(bdd_local)
newcur = newdb.cursor()
sql = "SELECT frlibtour, gblibtour, frdesctour, gbdesctour, etapes, fraccroche, gbaccroche FROM production.tour"
cur.execute(sql)
for row in cur.fetchall():
if row[4] == "None" or not row[4]:
continue
uuidpack = str(uuid.uuid4())
sql = "INSERT INTO pack.pack (uuidpack, e_datecreation, e_datemodification, arevoirle, encourstraitement, z_statutsuivi, z_groupedesuivi, z_cumultemps, z_esvn, is_publique, frlibpack, gblibpack, frdescpack, gbdescpack, fraccroche, gbaccroche) VALUES ('{uuidpack}', '{e_datecreation}', '{e_datemodification}', '{arevoirle}', {encourstraitement}, {z_statutsuivi}, '{z_groupedesuivi}', {z_cumultemps}, {z_esvn}, {is_publique}, '{frlibpack}', '{gblibpack}', '{frdescpack}', '{gbdescpack}', '{fraccroche}', '{gbaccroche}')".format(uuidpack=uuidpack, e_datecreation=str(datetime.datetime.now()), e_datemodification=str(datetime.datetime.now()), arevoirle='2016-10-29', encourstraitement=False, z_statutsuivi=0, z_groupedesuivi='ALLOA', z_cumultemps=0, z_esvn="''", is_publique=False, frlibpack=row[0], gblibpack=row[1], frdescpack=row[2].replace("'", "''"), gbdescpack=row[3].replace("'", "''"), fraccroche=row[5].replace("'", "''"), gbaccroche=row[6].replace("'", "''"))
try:
newcur.execute(sql)
newdb.commit()
except:
continue
for x in row[4].split('|'):
if x == "":
continue
etape = x.split(';')
if etape[0] == "":
continue
sql = "INSERT INTO pack.etape (uuidetape, ordre, uuidville, uuidpack) VALUES ('{}', {}, '{}', '{}')".format(str(uuid.uuid4()), etape[2], etape[0], uuidpack)
try:
newcur.execute(sql)
newdb.commit()
except:
pass

View File

@ -0,0 +1,698 @@
import psycopg2
from psycopg2.extras import *
import uuid
import datetime
import csv
'''
DB_PATH_MAIN = "host=localhost dbname=alloaV3 user=mad password=mad8888"
DB_PATH_WEB_CLIENT = "host=localhost dbname=alloaWebclientV3 user=mad password=mad8888"
class DB:
def _connect(self):
if self.path == "main":
self.db = psycopg2.connect(self.DB_PATH_MAIN)
elif self.path == 'web_client':
self.db = psycopg2.connect(self.DB_PATH_WEB_CLIENT)
self.cur = self.db.cursor(cursor_factory=psycopg2.extras.DictCursor)
self.is_connect = True
'''
'''
t_host = "localhost"
t_port = "5432"
t_dbname = "alloaWebclientV3"
t_name_user = "mad"
t_password = "mad8888"
'''
db_conn_old = psycopg2.connect(host="localhost", port="5432", dbname="alloavold", user="mad", password="mad8888")
db_cursor_old = db_conn_old.cursor()
is_connect=True
db_conn_new = psycopg2.connect(host="localhost", port="5432", dbname="dballoavv210729", user="mad", password="mad8888")
db_cursor_new = db_conn_new.cursor()
def close_old():
db_cursor_old.close()
def query_old(sql):
db_cursor_old.execute(sql)
data = db_cursor_old.fetchall()
#close()
return data
def execute_old(sql):
if not is_connect:
connect()
if debug:
print(sql)
try:
db_cursor_old.execute(sql)
valid = db_cursor_old.rowcount
db_conn_old.commit()
close()
return valid
print(sql)
except psycopg2.Error as e:
if e.pgcode == '23503':
db_conn_old.rollback()
return handle_error(e)
else:
raise
def close_new():
db_cursor_new.close()
def query_new(sql):
db_cursor_new.execute(sql)
data = db_cursor_new.fetchall()
#close()
return data
def execute_new(sql):
if not is_connect:
connect()
try:
db_cursor_new.execute(sql)
valid = db_cursor_new.rowcount
db_conn_new.commit()
#close()
return valid
print(sql)
except psycopg2.Error as e:
if e.pgcode == '23503':
db_conn_new.rollback()
return handle_error(e)
else:
raise
def remover():
sql="UPDATE vmap.pays SET uuidpays = '0d9665b8-32ed-412e-8f7c-110da6dce649' WHERE uuidpays = '9d9665b8-32ed-412e-8f7c-110da6dce649'; "
execute_new(sql)
#dans cette fonction, on remplace les apostrophes par des \' pour eviter les erreurs de string qui se terminent trop tot et qui causent des erreurs de syntax
def remplacer_apostrophe(cpy):
copy=[]
for i in range(len(cpy)):
liste=[]
for j in range(len(cpy[i])):
if isinstance(cpy[i][j],str)==True and isinstance(cpy[i][j],datetime.datetime)==False:
liste.append(cpy[i][j].replace("'", ""))
else:
liste.append(cpy[i][j])
copy.append(liste)
return(copy)
def map_pays():
#requete select dans l'ancienne base
copyreq="SELECT * FROM map.pays;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO vmap.pays values( '"+str(copy[i][26])+"', '"+str(copy[i][0])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][9])+"', '"+str(copy[i][8])+"', '"+str(copy[i][7])+"', '?', '"+str(copy[i][13])+"', '"+str(copy[i][12])+"', '"+str(copy[i][14])+"', '"+str(copy[i][16])+"', '"+str(copy[i][15])+"', '"+str(copy[i][17])+"','?','?','?','?', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"', '"+str(copy[i][24])+"', '"+str(copy[i][1])+"','?' );")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def map_gateway():
#requete select dans l'ancienne base
copyreq="SELECT * FROM map.gateway;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
checkref=[]
for i in range(len(copy)):
#ici, on verifie si la ref existe deja pour eviter les doublons
alreadyexists=False
for j in range(len(checkref)):
#print (str(checkref[j][12]))
if str(checkref[j])[0:3]==str(copy[i][13])[0:3]:
alreadyexists=True
#si la ref n'existe pas, on execute l'insertion de la ligne
if alreadyexists==False:
#print(str(copy[i][13]))
pastereq = ("INSERT INTO vmap.gateways values( '"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][9])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"','', '"+str(copy[i][12])+"', '"+str(copy[i][13])+"','','', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][17])+"', '"+str(copy[i][18])+"', '"+str(copy[i][21])+"', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"', '"+str(copy[i][24])+"', '"+str(copy[i][25])+"', '"+str(copy[i][26])+"', '"+str(copy[i][27])+"');")
execute_new(pastereq)
checkref.append(copy[i][13])
db_conn_new.commit()
#print(copy[i][0])
def map_regions():
#requete select dans l'ancienne base
copyreq="SELECT * FROM map.region;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
print("test")
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for en rearangeant les valeurs
for i in range(len(copy)):
pastereq = ("INSERT INTO vmap.Region values( '"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '"+str(copy[i][5])+"','00:00:00.000', '"+str(copy[i][6])+"', '"+str(copy[i][10])+"', '"+str(copy[i][9])+"', '"+str(copy[i][7])+"', '?', '"+str(copy[i][14])+"', '"+str(copy[i][2])+"', 'False', '"+str(copy[i][13])+"', '"+str(copy[i][50])+"', '"+str(copy[i][15])+"', '"+str(copy[i][17])+"', '"+str(copy[i][19])+"', '"+str(copy[i][21])+"', '"+str(copy[i][23])+"', '"+str(copy[i][25])+"', '"+str(copy[i][27])+"', '"+str(copy[i][29])+"','"+str(copy[i][16])+"', '"+str(copy[i][18])+"', '"+str(copy[i][20])+"', '"+str(copy[i][22])+"', '"+str(copy[i][24])+"', '"+str(copy[i][26])+"', '"+str(copy[i][28])+"', '"+str(copy[i][30])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][33])+"', '"+str(copy[i][34])+"', '"+str(copy[i][35])+"', '"+str(copy[i][36])+"', '"+str(copy[i][37])+"', '"+str(copy[i][38])+"', '"+str(copy[i][39])+"', '"+str(copy[i][40])+"', '"+str(copy[i][41])+"', '"+str(copy[i][42])+"', '"+str(copy[i][43])+"', '"+str(copy[i][44])+"', '"+str(copy[i][45])+"', '"+str(copy[i][46])+"', '"+str(copy[i][47])+"', '"+str(copy[i][52])+"', '"+str(copy[i][53])+"', '"+str(copy[i][48])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def map_ville():
#requete select dans l'ancienne base
copyreq="SELECT * FROM map.ville;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
#print(str(copy[i][23]))
#select regions where ville.uuidregion = uuidregion
reg=("SELECT uuidpays FROM map.region WHERE uuidregion='"+str(copy[i][23])+"';")
reg=query_old(reg)
#print(str(reg[0][0]))
#select pays where nompays = regions.paysregion
pays=("SELECT uuidpays FROM vmap.pays WHERE uuidpays='"+str(reg[0][0])+"';")
pays=query_new(pays)
#print(str(pays[0][0]))
pastereq = ("INSERT INTO vmap.ville values( '"+str(copy[i][24])+"', '"+str(copy[i][0])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][6])+"', '"+str(copy[i][10])+"', '"+str(copy[i][8])+"', '"+str(copy[i][7])+"', '"+str(copy[i][28])+"', '"+str(copy[i][13])+"', '"+str(copy[i][1])+"', '"+str(copy[i][12])+"', '', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][17])+"', '"+str(copy[i][18])+"', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"','','','','','','"+str(pays[0][0])+"', '"+str(copy[i][21])+"', '"+str(copy[i][22])+"')")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def map_dest():
#requete select dans l'ancienne base
copyreq="SELECT * FROM map.destination;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
print(str(copy[i][1]))
pastereq = ("INSERT INTO vmap.zone values( '"+str(copy[i][23])+"', '"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '00:00:00.000', '"+str(copy[i][4])+"', '"+str(copy[i][8])+"', '"+str(copy[i][7])+"', '"+str(copy[i][6])+"', '"+str(copy[i][21])+"', '"+str(copy[i][11])+"', '"+str(copy[i][12])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][17])+"', '"+str(copy[i][18])+"', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"','','');")
execute_new(pastereq)
db_conn_new.commit()
def map_zlienregiondest():
#requete select dans l'ancienne base
copyreq="SELECT * FROM map.z_lien_region_destination;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO vmap.zliensdestregions values('"+str(i)+"','"+str(copy[i][1])+"', '"+str(copy[i][0])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def map_zlienregvilles():
#requete select dans l'ancienne base
copyreq="SELECT * FROM map.z_lien_region_ville;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO vmap.zliensregvilles values('"+str(copy[i][0])+"','"+str(copy[i][1])+"', '"+str(copy[i][2])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def og_ej():
#requete select dans l'ancienne base
copyreq="SELECT * FROM ogbase.entitejuridique;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
for i in range(len(copy)):
#pastereq = ("INSERT INTO og.ej values( '"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][5])+"', '?', '0', '"+str(copy[i][7])+"', '"+str(copy[i][30])+"', '"+str(copy[i][8])+"', '"+str(copy[i][9])+"', '"+str(copy[i][10])+"', '"+str(copy[i][12])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"', '?', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"', '"+str(copy[i][24])+"', '"+str(copy[i][26])+"', '"+str(copy[i][27])+"', '"+str(copy[i][28])+"', '"+str(copy[i][29])+"', '"+str(copy[i][30])+"', '"+str(copy[i][32])+"', '"+str(copy[i][31])+"');")
pastereq = ("INSERT INTO og.ej values( '"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][3])+"', '00:00:00.000', '"+str(copy[i][5])+"', '?', '0', '"+str(copy[i][7])+"', '"+str(copy[i][30])+"', '"+str(copy[i][8])+"', '"+str(copy[i][9])+"', '"+str(copy[i][10])+"', '"+str(copy[i][12])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '"+str(copy[i][20])+"', '', '?', '01-Sep-1983', '01-Sep-1983', '01-Sep-1983', '???', '"+str(copy[i][27])+"', '"+str(copy[i][28])+"', '"+str(copy[i][29])+"', '"+str(copy[i][30])+"', '"+str(copy[i][32])+"', '"+str(copy[i][31])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def og_oggroup():
#requete select dans l'ancienne base
copyreq="SELECT * FROM ogbase.oggroup;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
copyreq2="SELECT * FROM ogbase.ogstaff;"
cpy2=query_old(copyreq2)
copy2=remplacer_apostrophe(cpy2)
for i in range(len(copy)):
pastereq = ("INSERT INTO og.oggroup values( '"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][5])+"', '01-Sep-1983', '01-Sep-1983', '00:00:00.000', '"+str(copy[i][8])+"', '"+str(copy[i][0])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '0');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def og_ogstaff():
#requete select dans l'ancienne base
copyreq="SELECT * FROM ogbase.ogstaff;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
for i in range(len(copy)):
print(len(copy[0]))
if str(copy[i][1])!="aeaze":
print("okay")
pastereq = ("INSERT INTO og.ogstaff values( '"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"', '"+str(copy[i][6])+"', '"+str(copy[i][8])+"', '"+str(copy[i][9])+"', '"+str(copy[i][21])+"', '"+str(copy[i][12])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '1983-09-01', '1983-09-01', '"+str(copy[i][19])+"', '"+str(copy[i][18])+"', '0000000000', '"+str(copy[i][15])+"', '', '"+str(copy[i][16])+"', '"+str(copy[i][17])+"', '', '', '"+str(copy[i][20])+"', '', '', '','','FALSE','FALSE','FALSE','');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def og_ogmodule():
#requete select dans l'ancienne base
copyreq="SELECT * FROM ogbase.ogmodule;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
for i in range(len(copy)):
if str(copy[i][1])!="aeaze":
pastereq = ("INSERT INTO og.ogmodul values( '"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][6])+"', '"+str(copy[i][2])+"', '"+str(copy[i][7])+"', '"+str(copy[i][8])+"', '"+str(copy[i][9])+"' );")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def ogc_classgroup():
#requete select dans l'ancienne base
copyreq="SELECT * FROM ogcompta.ogclassregroupement;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO ogcpta.classegroup values('"+str(copy[i][0])+"','"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][12])+"', '"+str(copy[i][8])+"', '"+str(copy[i][10])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"','');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def ogc_journaux():
#requete select dans l'ancienne base
copyreq="SELECT * FROM ogcompta.journaux;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO ogcpta.jnx values('"+str(i)+"','"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"','00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][9])+"', '"+str(copy[i][11])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def ogc_ecrit():
#requete select dans l'ancienne base
copyreq="SELECT * FROM ogcompta.ecriture;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO ogcpta.ecrit values('"+str(copy[i][0])+"','"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"','00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][10])+"','', '"+str(copy[i][27])+"', '"+str(copy[i][12])+"', '"+str(copy[i][8])+"', '"+str(copy[i][11])+"', '"+str(copy[i][29])+"','','','','01-Sep-1983', '', '"+str(copy[i][9])+"', '"+str(copy[i][14])+"','', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"','','01-Sep-1983', '"+str(copy[i][24])+"', '"+str(copy[i][38])+"', '"+str(copy[i][25])+"', '"+str(copy[i][20])+"', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"', '01-Sep-1983','');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def prod_avv():
#requete select dans l'ancienne base
copyreq="SELECT * FROM production.avv;"
cpy=query_old(copyreq)
print(len(cpy))
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO vcatalog.avv values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"','00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"','', '"+str(copy[i][9])+"', '"+str(copy[i][13])+"', '"+str(copy[i][12])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][18])+"', '"+str(copy[i][17])+"', '"+str(copy[i][19])+"', '"+str(copy[i][21])+"', '"+str(copy[i][20])+"', '"+str(copy[i][22])+"', '"+str(copy[i][35])+"','',, '"+str(copy[i][53])+"', '"+str(copy[i][54])+"','', '"+str(copy[i][23])+"', '"+str(copy[i][26])+"','FALSE', '"+str(copy[i][28])+"', '"+str(copy[i][27])+"', '"+str(copy[i][30])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][44])+"', '"+str(copy[i][24])+"', '"+str(copy[i][29])+"', '"+str(copy[i][33])+"','', '"+str(copy[i][34])+"', '"+str(copy[i][55])+"', '"+str(copy[i][56])+"', '"+str(copy[i][57])+"', '"+str(copy[i][40])+"', '"+str(copy[i][41])+"', '"+str(copy[i][42])+"', '"+str(copy[i][43])+"', '"+str(copy[i][45])+"', '"+str(copy[i][47])+"', '"+str(copy[i][48])+"', 'False', '"+str(copy[i][50])+"', '"+str(copy[i][51])+"', '"+str(copy[i][58])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def prod_hebergement():
#requete select dans l'ancienne base
copyreq="SELECT * FROM production.hebergement;"
cpy=query_old(copyreq)
#print(len(cpy))
copy=remplacer_apostrophe(cpy)
villes="SELECT * FROM vmap.ville;"
villes=query_new(villes)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
villenum=-1
for j in range(len(villes)):
if str(copy[i][75])==str(villes[j][1]):
villenum=j
break;
#tous les booleens a l'index >= 83 sont non definis (none) ce qui retourne une erreur
if villenum==-1:
#pastereq = ("INSERT INTO vcatalog.hebergement values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"','00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"', '', '"+str(copy[i][9])+"', '"+str(copy[i][12])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][17])+"', '"+str(copy[i][18])+"', '', '', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"', '', '', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"','uuidpays (a changer)', 'codeville (a changer)','cphebergement(a changer)', '"+str(copy[i][24])+"', '"+str(copy[i][76])+"', '"+str(copy[i][77])+"','', '"+str(copy[i][25])+"', '"+str(copy[i][26])+"', '"+str(copy[i][27])+"', '"+str(copy[i][28])+"','False', '"+str(copy[i][30])+"', '"+str(copy[i][29])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][34])+"', '"+str(copy[i][35])+"', '"+str(copy[i][36])+"', '"+str(copy[i][37])+"', '"+str(copy[i][38])+"', '"+str(copy[i][39])+"', '"+str(copy[i][40])+"', '"+str(copy[i][41])+"', '"+str(copy[i][42])+"', '"+str(copy[i][43])+"', '"+str(copy[i][44])+"', '"+str(copy[i][45])+"','False', '"+str(copy[i][50])+"', '"+str(copy[i][51])+"', '"+str(copy[i][52])+"', '"+str(copy[i][53])+"', '"+str(copy[i][54])+"', '"+str(copy[i][55])+"', '"+str(copy[i][56])+"', '"+str(copy[i][57])+"', '"+str(copy[i][58])+"', '"+str(copy[i][59])+"', '"+str(copy[i][145])+"', '"+str(copy[i][164])+"','False', '"+str(copy[i][88])+"', '"+str(copy[i][115])+"', '"+str(copy[i][60])+"', '"+str(copy[i][61])+"', '"+str(copy[i][62])+"', '"+str(copy[i][63])+"', '"+str(copy[i][64])+"', '"+str(copy[i][66])+"', '"+str(copy[i][71])+"', '"+str(copy[i][72])+"', '"+str(copy[i][73])+"', '"+str(copy[i][46])+"', '"+str(copy[i][67])+"', '"+str(copy[i][65])+"', '"+str(copy[i][47])+"', '"+str(copy[i][49])+"','','', '"+str(copy[i][75])+"');")
pastereq = ("INSERT INTO vcatalog.hebergement values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"','00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"', '', '"+str(copy[i][9])+"', '"+str(copy[i][12])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][17])+"', '"+str(copy[i][18])+"', '', '', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"', '', '', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"','uuidpays (a changer)', 'code ND','cp ND', '"+str(copy[i][24])+"', '"+str(copy[i][76])+"', '"+str(copy[i][77])+"','', '"+str(copy[i][25])+"', '"+str(copy[i][26])+"', '"+str(copy[i][27])+"', '"+str(copy[i][28])+"','False', '"+str(copy[i][30])+"', '"+str(copy[i][29])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][34])+"', '"+str(copy[i][35])+"', '"+str(copy[i][36])+"', '"+str(copy[i][37])+"', '"+str(copy[i][38])+"', '"+str(copy[i][39])+"', '"+str(copy[i][40])+"', '"+str(copy[i][41])+"', '"+str(copy[i][42])+"', '"+str(copy[i][43])+"', '"+str(copy[i][44])+"', '"+str(copy[i][45])+"','False', '"+str(copy[i][50])+"', '"+str(copy[i][51])+"', '"+str(copy[i][52])+"', '"+str(copy[i][53])+"', '"+str(copy[i][54])+"', '"+str(copy[i][55])+"', '"+str(copy[i][56])+"', '"+str(copy[i][57])+"', '"+str(copy[i][58])+"', '"+str(copy[i][59])+"', 'False', 'False','False', 'False', 'False', '"+str(copy[i][60])+"', '"+str(copy[i][61])+"', '"+str(copy[i][62])+"', '"+str(copy[i][63])+"', '"+str(copy[i][64])+"', '"+str(copy[i][66])+"', '"+str(copy[i][71])+"', '"+str(copy[i][72])+"', '"+str(copy[i][73])+"', '"+str(copy[i][46])+"', '"+str(copy[i][67])+"', '"+str(copy[i][65])+"', '"+str(copy[i][47])+"', '"+str(copy[i][49])+"','','', '"+str(copy[i][75])+"');")
else:
#pastereq = ("INSERT INTO vcatalog.hebergement values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"','00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"', '', '"+str(copy[i][9])+"', '"+str(copy[i][12])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][17])+"', '"+str(copy[i][18])+"', '', '', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"', '', '', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"','"+str(villes[villenum][27])+"', '"+str(villes[villenum][13])+"','"+str(villes[villenum][19])+"', '"+str(copy[i][24])+"', '"+str(copy[i][76])+"', '"+str(copy[i][77])+"','', '"+str(copy[i][25])+"', '"+str(copy[i][26])+"', '"+str(copy[i][27])+"', '"+str(copy[i][28])+"','False', '"+str(copy[i][30])+"', '"+str(copy[i][29])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][34])+"', '"+str(copy[i][35])+"', '"+str(copy[i][36])+"', '"+str(copy[i][37])+"', '"+str(copy[i][38])+"', '"+str(copy[i][39])+"', '"+str(copy[i][40])+"', '"+str(copy[i][41])+"', '"+str(copy[i][42])+"', '"+str(copy[i][43])+"', '"+str(copy[i][44])+"', '"+str(copy[i][45])+"','False', '"+str(copy[i][50])+"', '"+str(copy[i][51])+"', '"+str(copy[i][52])+"', '"+str(copy[i][53])+"', '"+str(copy[i][54])+"', '"+str(copy[i][55])+"', '"+str(copy[i][56])+"', '"+str(copy[i][57])+"', '"+str(copy[i][58])+"', '"+str(copy[i][59])+"', '"+str(copy[i][145])+"', '"+str(copy[i][164])+"','False', '"+str(copy[i][88])+"', '"+str(copy[i][115])+"', '"+str(copy[i][60])+"', '"+str(copy[i][61])+"', '"+str(copy[i][62])+"', '"+str(copy[i][63])+"', '"+str(copy[i][64])+"', '"+str(copy[i][66])+"', '"+str(copy[i][71])+"', '"+str(copy[i][72])+"', '"+str(copy[i][73])+"', '"+str(copy[i][46])+"', '"+str(copy[i][67])+"', '"+str(copy[i][65])+"', '"+str(copy[i][47])+"', '"+str(copy[i][49])+"','','', '"+str(copy[i][75])+"');")
pastereq = ("INSERT INTO vcatalog.hebergement values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"','00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"', '', '"+str(copy[i][9])+"', '"+str(copy[i][12])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][17])+"', '"+str(copy[i][18])+"', '', '', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"', '', '', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"','"+str(villes[villenum][27])+"', '"+str(villes[villenum][13])+"','"+str(villes[villenum][19])+"', '"+str(copy[i][24])+"', '"+str(copy[i][76])+"', '"+str(copy[i][77])+"','', '"+str(copy[i][25])+"', '"+str(copy[i][26])+"', '"+str(copy[i][27])+"', '"+str(copy[i][28])+"','False', '"+str(copy[i][30])+"', '"+str(copy[i][29])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][34])+"', '"+str(copy[i][35])+"', '"+str(copy[i][36])+"', '"+str(copy[i][37])+"', '"+str(copy[i][38])+"', '"+str(copy[i][39])+"', '"+str(copy[i][40])+"', '"+str(copy[i][41])+"', '"+str(copy[i][42])+"', '"+str(copy[i][43])+"', '"+str(copy[i][44])+"', '"+str(copy[i][45])+"','False', '"+str(copy[i][50])+"', '"+str(copy[i][51])+"', '"+str(copy[i][52])+"', '"+str(copy[i][53])+"', '"+str(copy[i][54])+"', '"+str(copy[i][55])+"', '"+str(copy[i][56])+"', '"+str(copy[i][57])+"', '"+str(copy[i][58])+"', '"+str(copy[i][59])+"', 'False', 'False','False', 'False', 'False', '"+str(copy[i][60])+"', '"+str(copy[i][61])+"', '"+str(copy[i][62])+"', '"+str(copy[i][63])+"', '"+str(copy[i][64])+"', '"+str(copy[i][66])+"', '"+str(copy[i][71])+"', '"+str(copy[i][72])+"', '"+str(copy[i][73])+"', '"+str(copy[i][46])+"', '"+str(copy[i][67])+"', '"+str(copy[i][65])+"', '"+str(copy[i][47])+"', '"+str(copy[i][49])+"','','', '"+str(copy[i][75])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def prod_avv():
#requete select dans l'ancienne base
copyreq="SELECT * FROM production.avv;"
cpy=query_old(copyreq)
print(len(cpy))
copy=remplacer_apostrophe(cpy)
villes="SELECT * FROM vmap.ville;"
villes=query_new(villes)
services="SELECT * FROM production.type_service;"
services=query_old(services)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
villenum=-1
for j in range(len(villes)):
if str(copy[i][40])==str(villes[j][1]):
if len(str(villes[j][12]))<=10:
villenum=j
break;
servicenum=-1
for j in range(len(services)):
if str(copy[i][39])==str(services[j][1]):
servicenum=j
break;
if villenum==-1:
pastereq = ("INSERT INTO vcatalog.avv values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"', '', '"+str(copy[i][9])+"', '"+str(copy[i][13])+"', '"+str(copy[i][12])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][18])+"', '"+str(copy[i][17])+"', '"+str(copy[i][19])+"', '"+str(copy[i][21])+"', '"+str(copy[i][20])+"', '"+str(copy[i][22])+"','codvil','', '"+str(copy[i][53])+"', '"+str(copy[i][54])+"','False', '"+str(copy[i][23])+"', '"+str(copy[i][26])+"','False', '"+str(copy[i][28])+"', '"+str(copy[i][27])+"', '"+str(copy[i][30])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][23])+"', '"+str(copy[i][24])+"', '"+str(copy[i][29])+"', '"+str(copy[i][33])+"', 'typeserv', '"+str(copy[i][34])+"', '"+str(copy[i][55])+"', '"+str(copy[i][56])+"', '"+str(copy[i][57])+"', '"+str(copy[i][40])+"', '"+str(copy[i][41])+"', '"+str(copy[i][42])+"', '"+str(copy[i][43])+"', '"+str(copy[i][45])+"', '"+str(copy[i][47])+"', '"+str(copy[i][48])+"', '"+str(copy[i][49])+"', '"+str(copy[i][50])+"', '"+str(copy[i][51])+"', '"+str(copy[i][58])+"');")
else:
pastereq = ("INSERT INTO vcatalog.avv values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"', '', '"+str(copy[i][9])+"', '"+str(copy[i][13])+"', '"+str(copy[i][12])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][18])+"', '"+str(copy[i][17])+"', '"+str(copy[i][19])+"', '"+str(copy[i][21])+"', '"+str(copy[i][20])+"', '"+str(copy[i][22])+"','"+str(villes[villenum][13])+"','', '"+str(copy[i][53])+"', '"+str(copy[i][54])+"','False', '"+str(copy[i][23])+"', '"+str(copy[i][26])+"','False', '"+str(copy[i][28])+"', '"+str(copy[i][27])+"', '"+str(copy[i][30])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][23])+"', '"+str(copy[i][24])+"', '"+str(copy[i][29])+"', '"+str(copy[i][33])+"', '"+str(services[servicenum][6])+"', '"+str(copy[i][34])+"', '"+str(copy[i][55])+"', '"+str(copy[i][56])+"', '"+str(copy[i][57])+"', '"+str(copy[i][40])+"', '"+str(copy[i][41])+"', '"+str(copy[i][42])+"', '"+str(copy[i][43])+"', '"+str(copy[i][45])+"', '"+str(copy[i][47])+"', '"+str(copy[i][48])+"', '"+str(copy[i][49])+"', '"+str(copy[i][50])+"', '"+str(copy[i][51])+"', '"+str(copy[i][58])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def prod_tour():
#requete select dans l'ancienne base
copyreq="SELECT * FROM production.tour;"
cpy=query_old(copyreq)
copy=remplacer_apostrophe(cpy)
villes="SELECT * FROM vmap.ville;"
villes=query_new(villes)
services="SELECT * FROM production.type_service;"
services=query_old(services)
refs=[]
print(len(cpy[0]))
print(len(villes[0]))
print(len(services[0]))
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
villenum=-1
for j in range(len(villes)):
if str(copy[i][40])==str(villes[j][1]):
if len(str(villes[j][12]))<=10:
villenum=j
break;
servicenum=-1
for j in range(len(services)):
if str(copy[i][39])==str(services[j][1]):
servicenum=j
break;
valid=True
for j in range(len(refs)):
if str(copy[i][12])==str(refs[j]):
valid=False
break;
#if len(str(copy[i][1]))!=36:
# valid=False
if valid==True:
if villenum==-1:
pastereq = ("INSERT INTO vcatalog.tour values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][9])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"','', '"+str(copy[i][13])+"', '"+str(copy[i][12])+"','typeservice','codevil','"+str(copy[0][40])+"','', '"+str(copy[i][14])+"','"+str(copy[0][40])+"', '"+str(copy[i][15])+"', '"+str(copy[i][17])+"', '"+str(copy[i][18])+"', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"', '"+str(copy[i][24])+"', '"+str(copy[i][25])+"', '"+str(copy[i][26])+"', '"+str(copy[i][27])+"', '"+str(copy[i][28])+"', '"+str(copy[i][29])+"', '"+str(copy[i][30])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][33])+"', '"+str(copy[i][34])+"', '"+str(copy[i][35])+"', '"+str(copy[i][36])+"', '"+str(copy[i][16])+"', '"+str(copy[i][37])+"', '"+str(copy[i][38])+"','True','True');")
else:
pastereq = ("INSERT INTO vcatalog.tour values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][9])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"','', '"+str(copy[i][13])+"', '"+str(copy[i][12])+"','"+str(services[servicenum][6])+"','"+str(villes[villenum][12])+"','"+str(copy[i][40])+"','"+str(copy[i][40])+"', '"+str(copy[i][14])+"','', '"+str(copy[i][15])+"', '"+str(copy[i][17])+"', '"+str(copy[i][18])+"', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"', '"+str(copy[i][24])+"', '"+str(copy[i][25])+"', '"+str(copy[i][26])+"', '"+str(copy[i][27])+"', '"+str(copy[i][28])+"', '"+str(copy[i][29])+"', '"+str(copy[i][30])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][33])+"', '"+str(copy[i][34])+"', '"+str(copy[i][35])+"', '"+str(copy[i][36])+"', '"+str(copy[i][16])+"', '"+str(copy[i][37])+"', '"+str(copy[i][38])+"','True','True');")
refs.append(copy[i][12])
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def prod_guide():
#requete select dans l'ancienne base
copyreq="SELECT * FROM production.guide;"
cpy=query_old(copyreq)
print(len(cpy))
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO vcatalog.guide values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"','00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"','', '"+str(copy[i][9])+"', '"+str(copy[i][13])+"', '"+str(copy[i][12])+"', '"+str(copy[i][16])+"', '"+str(copy[i][18])+"', '"+str(copy[i][19])+"', '"+str(copy[i][21])+"','', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"','codvil', '"+str(copy[i][24])+"', '"+str(copy[i][23])+"','01-Sep-1983','01-Sep-1983', '"+str(copy[i][22])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def prod_image():
#requete select dans l'ancienne base
copyreq="SELECT * FROM production.image;"
cpy=query_old(copyreq)
print(len(cpy))
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO vcatalog.image values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"', '"+str(copy[i][5])+"','00:00:00.000', '"+str(copy[i][6])+"', '"+str(copy[i][9])+"', '"+str(copy[i][7])+"','', '"+str(copy[i][10])+"', '"+str(copy[i][41])+"', '"+str(copy[i][2])+"', '"+str(copy[i][42])+"', '"+str(copy[i][13])+"', '"+str(copy[i][14])+"', '"+str(copy[i][15])+"', '"+str(copy[i][16])+"', '"+str(copy[i][18])+"', '"+str(copy[i][17])+"', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][21])+"', '"+str(copy[i][22])+"', '"+str(copy[i][23])+"', '"+str(copy[i][24])+"', '"+str(copy[i][25])+"', '"+str(copy[i][26])+"', '"+str(copy[i][27])+"', '"+str(copy[i][28])+"', '"+str(copy[i][29])+"', '"+str(copy[i][30])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"', '"+str(copy[i][33])+"', '"+str(copy[i][34])+"', '"+str(copy[i][35])+"', '"+str(copy[i][36])+"', '"+str(copy[i][37])+"', '"+str(copy[i][38])+"', '"+str(copy[i][39])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def prod_prix():
#requete select dans l'ancienne base
copyreq="SELECT * FROM production.prix;"
cpy=query_old(copyreq)
print(len(cpy))
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO vcatalog.hebergprix values('"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"', '"+str(copy[i][4])+"','00:00:00.000', '"+str(copy[i][5])+"', '"+str(copy[i][8])+"', '"+str(copy[i][6])+"','', '"+str(copy[i][9])+"', '"+str(copy[i][18])+"', '"+str(copy[i][12])+"','', '"+str(copy[i][19])+"', '"+str(copy[i][24])+"', '"+str(copy[i][35])+"', '"+str(copy[i][13])+"', '"+str(copy[i][15])+"', '"+str(copy[i][14])+"', '"+str(copy[i][16])+"', '"+str(copy[i][21])+"','','devise','devisetaux','','', '"+str(copy[i][17])+"', '"+str(copy[i][24])+"', '"+str(copy[i][25])+"','','', '"+str(copy[i][33])+"','','','','', '"+str(copy[i][34])+"', '"+str(copy[i][36])+"', '"+str(copy[i][29])+"', '"+str(copy[i][30])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"','','');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def pack_pack():
#requete select dans l'ancienne base
copyreq="SELECT * FROM pack.pack;"
cpy=query_old(copyreq)
print(len(cpy))
copy=remplacer_apostrophe(cpy)
#ici on parcours touts les rows du select pour les transmettre ligne par ligne dans une boucle for
for i in range(len(copy)):
pastereq = ("INSERT INTO pack.pack values('"+i+"', '"+str(copy[i][0])+"', '"+str(copy[i][1])+"', '"+str(copy[i][2])+"', '"+str(copy[i][3])+"','00:00:00.000', '"+str(copy[i][4])+"', '"+str(copy[i][8])+"', '"+str(copy[i][7])+"', '"+str(copy[i][5])+"','', '"+str(copy[i][11])+"','', '"+str(copy[i][12])+"', '"+str(copy[i][16])+"', '"+str(copy[i][14])+",'', '"+str(copy[i][13])+"', '"+str(copy[i][17])+"', '"+str(copy[i][15])+"','', '"+str(copy[i][19])+"', '"+str(copy[i][20])+"', '"+str(copy[i][31])+"', '"+str(copy[i][32])+"');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
def ogfiche_clients():
#ici on ouvre le fichier csv et on le place dans une liste a l'aide du module csv
with open('clients.csv',encoding='ISO-8859-1',newline='') as f:
reader = csv.reader(f)
copy = list(reader)
copy=remplacer_apostrophe(copy)
#print(copy)
for i in range(len(copy)):
pastereq = ("INSERT INTO ogfiche.f41clients values('"+str(copy[i][1])+"','"+str(uuid.uuid4())+"','"+str(copy[i][3])+"','1983-09-01','1983-09-01','00:00:00.000','','','1983-09-01','"+str(copy[i][25])+"','GROUP','REFFIC','"+str(i)+"','False','"+str(copy[i][4])+"','"+str(copy[i][5])+"','"+str(copy[i][6])+"','"+str(copy[i][7])+"','"+str(copy[i][10])+' '+str(copy[i][11])+"','"+str(copy[i][16])+"','"+str(copy[i][13])+"','"+str(copy[i][14])+"','"+str(copy[i][17])+"','"+str(copy[i][18])+"','"+str(copy[i][19])+"','','"+str(copy[i][21])+"','','','','False','False','CSPF','"+str(copy[i][10])+' '+str(copy[i][11])+"','"+str(copy[i][16])+"','"+str(copy[i][13])+"','"+str(copy[i][14])+"','','"+str(copy[i][10])+' '+str(copy[i][11])+"','"+str(copy[i][16])+"','"+str(copy[i][13])+"','"+str(copy[i][14])+"','','','','"+str(copy[i][24])+"','1983-09-01','1983-09-01','','False','False','False','','','1983-09-01','','','','"+str(copy[i][17])+"','','','False','','1983-09-01','False');")
execute_new(pastereq)
db_conn_new.commit()
#print(copy[i][0])
#map_pays()
#map_regions()
#map_ville()
#map_dest()
#map_gateway()
#map_zlienregvilles() /!\DROITS REFUSéS/!\
#map_zlienregiondest()
#og_ej()
#og_oggroup()
#og_ogstaff()
#og_ogmodule()
#prod_avv()
#prod_hebergement()
#prod_tour()
#prod_guide()
#prod_image()
#prod_prix()
#ogc_ecrit()
#ogc_journaux()
#pack_pack()
ogfiche_clients()

View File

@ -0,0 +1,117 @@
#!usr/bin/python3
import psycopg2
from psycopg2.extras import *
import time, datetime
def do_transfert(bdd, newbdd):
try:
db = psycopg2.connect("dbname='"+ bdd['base'] +"' user='" + bdd['login'] +"' host='" + bdd['host'] +"' password='" + bdd['mdp'] +"'")
newdb = psycopg2.connect("dbname='"+ newbdd['base'] +"' user='" + newbdd['login'] +"' host='" + newbdd['host'] +"' password='" + newbdd['mdp'] +"'")
cur = db.cursor()
curdata = db.cursor(cursor_factory=psycopg2.extras.DictCursor)
newcur = newdb.cursor()
except:
raise
error = 0
for schema in bdd['schemanames']:
print("\n##### SCHEMA %s #####" % schema)
cur.execute("select tablename from pg_tables where schemaname ='%s'" % schema)
tables = cur.fetchall()
for table in tables:
start = time.clock()
print("\t##### TABLE %s #####" % table[0])
try:
cur.execute("Select c.column_name, c.data_type from information_schema.columns AS c \
WHERE c.table_schema = '%s' AND c.table_name = '%s' order by c.ordinal_position " % (schema, table[0]))
except:
error += 1
raise
columns = cur.fetchall()
vNbFields = len(columns)
req = "Select "
i = 0
for column in columns:
req += column[0]
i += 1
if i < vNbFields: req += ", "
req += " FROM " + schema + "." + table[0] + ""
try:
curdata.execute("Select * from " + schema + "." + table[0] + "")
except:
raise
donnees = curdata.fetchall()
print("\tIl y a %d enregistrements dans la table" % (len(donnees)))
print("\tTransfert des données vers la nouvelle base")
for row in donnees:
req = "INSERT INTO " + schema + "." + table[0] + "("
i = 0
for column in columns:
req += column[0]
i += 1
if i < vNbFields:
req += ", "
req +=") VALUES("
i = 0
for champs in row:
if isinstance(champs, (int, float)):
req += "%s" % champs
elif isinstance(champs, str):
req += "'%s'" % champs.replace("'", "''")
elif isinstance(champs, datetime.date):
req += "'%s'" % champs
elif champs is None:
req += "Null"
else:
req += "%s" % champs
i += 1
if i < vNbFields:
req += ", "
req +=")"
#print(req)
newcur.execute(req)
newdb.commit()
stop = time.clock()
print("\tTable copiée en %s minutes\n" % str(stop-start))
if __name__ == '__main__' :
#login = input("Entrez le login de connexion de la base postgres a generer en classes storm : ")
#mdp = input("Entrez le mot de passe de cet utilisateur postgres : ")
bdd = {}
bdd['host'] = input("Entrez l'hote de la base a generer ; ")
bdd['port'] = input("Entrez le port a utiliser : ")
bdd['base'] = input("Entrez le nom de la base de donnee a copier de ce serveur : ")
bdd['login'] = input("Entrez le nom d'utilisateur")
bdd['mdp'] = input("Entrez le mot de passe")
schema = ""
bdd['schemanames'] = []
newbdd = {}
newbdd['host'] = input("Entrez l'hôte de la nouvelle bdd : ")
newbdd['port'] = input("Entrez le port de la nouvelle bdd : ")
newbdd['login'] = input("Entrez le login de la nouvelle bdd : ")
newbdd['mdp'] = input("Entrez le mdp de la nouvelle bdd : ")
newbdd['base'] = input("Entrez le nom de la bdd a copier : ")
nb = 1
while schema != "0" :
schema = input("Entrez le nom du schema a copier n " + str(nb) + " (ou entrez le chiffre 0 pour commencer la copie des données) : ")
nb += 1
if schema != "0" :
bdd['schemanames'].append(schema)
do_transfert(bdd, newbdd)

View File

@ -0,0 +1,49 @@
#!/usr/bin/env python
import psycopg2
newbdd = {}
newbdd['host'] = "192.168.0.67"
newbdd['port'] = "5432"
newbdd['base'] = "alloa"
newbdd['login'] = "mad"
newbdd['mdp'] = "mad8888"
bdd = {}
bdd['host'] = "127.0.0.1"
bdd['port'] = "5432"
bdd['base'] = "backup"
bdd['login'] = "dev"
bdd['mdp'] = "dev8888"
try:
db = psycopg2.connect("dbname='"+ bdd['base'] +"' user='" + bdd['login'] +"' host='" + bdd['host'] +"' password='" + bdd['mdp'] +"'")
newdb = psycopg2.connect("dbname='"+ newbdd['base'] +"' user='" + newbdd['login'] +"' host='" + newbdd['host'] +"' password='" + newbdd['mdp'] +"'")
cur = db.cursor()
newcur = newdb.cursor()
except:
raise
sql = "SELECT uuidnewsweb, z_date_creation, z_date_modification, z_groupe_createur, z_en_cours_traitement, z_date_a_revoir_le, z_locale_svn, z_historique, frlibnewsweb, gblibnewsweb, frtextnewsweb, gbtextnewsweb, expediteur, signature_expediteur, date_de_lenvoi, is_modele, refnewsweb, uuidimage, is_publique FROM marketing.newsweb"
cur.execute(sql)
for row in list(cur.fetchall()):
row = list(row)
if row[10] is None:
row[10] = ""
if row[11] is None:
row[11] = ""
if row[17] is None:
row[17] = ""
if row[14] is None:
row[14] = "NULL"
else:
row[14] = "'{}'".format(row[14])
sql = "INSERT INTO marketing.newsweb(uuidnewsweb, e_semaphore, e_datecreation, e_datemodification, e_historique, arevoirle, encourstraitement, z_statutsuivi, z_groupedesuivi, z_cumultemps, z_esvn, frlibnewsweb, gblibnewsweb, frtextnewsweb, gbtextnewsweb, expediteur, signature_expediteur, date_de_lenvoi, is_modele, refnewsweb, is_publique, uuidimage) VALUES ('{}', '', '{}', '{}', '{}', '{}', {}, 0, 'ALLOA', 0, 0, '{}', '{}', '{}', '{}', '{}', '{}', {}, {}, '{}', {}, '{}')".format(row[0], row[1], row[2], row[7], row[5], row[4], row[8].replace("'", "''"), row[9].replace("'", "''"), row[10].replace("'", "''"), row[11].replace("'", "''"), row[12], row[13], row[14], row[15], row[16], row[18], row[17])
try:
newcur.execute(sql)
newdb.commit()
except:
print(sql)
raise

View File

@ -0,0 +1,247 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkWindow" id="mainWindow">
<property name="can-focus">False</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Type compte&lt;/b&gt;</property>
<property name="use-markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator1">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<!-- n-columns=2 n-rows=4 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-homogeneous">True</property>
<property name="column-homogeneous">True</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Référence :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="frlibogmodul">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Libellé FR :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="frlibtypcpte">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="gblibogmodul">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Tranche compte début :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="tranchecomptedebuttypcpte">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">5</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Tranche compte fin :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="reftypcpte">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">6</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="tranchecomptefintypcpte">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">5</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkToolButton" id="cancelButton">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-important">True</property>
<property name="label" translatable="yes">Annuler</property>
<property name="use-underline">True</property>
<property name="icon-name">gtk-cancel</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="print">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-important">True</property>
<property name="label" translatable="yes">Imprimer</property>
<property name="use-underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="validateButton">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-important">True</property>
<property name="label" translatable="yes">Valider</property>
<property name="use-underline">True</property>
<property name="icon-name">gtk-apply</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,263 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkWindow" id="mainWindow">
<property name="can-focus">False</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes"> Classe </property>
<attributes>
<attribute name="font-desc" value="Sans Bold 10"/>
<attribute name="background" value="#8f8ff0f0a4a4"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator1">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<!-- n-columns=2 n-rows=5 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-homogeneous">True</property>
<property name="column-homogeneous">True</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Référence :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="frlibogmodul">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Libellé FR :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="frlibtypcpte">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">15</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="gblibogmodul">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Lib GB</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="tranchecomptedebuttypcpte">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">5</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="reftypcpte">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">6</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton">
<property name="label" translatable="yes">NPC FR</property>
<property name="use-action-appearance">False</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="recherche_web">
<property name="label" translatable="yes">AngloSaxon plan</property>
<property name="use-action-appearance">False</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkToolButton" id="cancelButton">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-important">True</property>
<property name="label" translatable="yes">Annuler</property>
<property name="use-underline">True</property>
<property name="icon-name">gtk-cancel</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="print">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-important">True</property>
<property name="label" translatable="yes">Imprimer</property>
<property name="use-underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="validateButton">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-important">True</property>
<property name="label" translatable="yes">Valider</property>
<property name="use-underline">True</property>
<property name="icon-name">gtk-apply</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,515 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkWindow" id="editPlanComptableWindow">
<property name="can-focus">False</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Plan Comptable&lt;/b&gt;</property>
<property name="use-markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator1">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<!-- n-columns=4 n-rows=5 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-homogeneous">True</property>
<property name="column-homogeneous">True</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">N° compte :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Libellé FR :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Libellé EN :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="frlibogplancomptable">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">75</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="gblibogplancomptable">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">75</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Toujours actif :</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Toujours passif :</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="tjractifplancomptable">
<property name="label" translatable="yes"> </property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="tjrpassifplancomptable">
<property name="label" translatable="yes"> </property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Compte bloqué :</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="comptebloqueplancomptable">
<property name="label" translatable="yes"> </property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type de compte :</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="libtypecompte">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">-</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="uuidtypecompte">
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="get_typecompte">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">gtk-find</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Exercice comptable :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="frlibogexcompta">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">-</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="uuidogexcompta">
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="get_excompta">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">gtk-find</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Encours maxi :</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="refogplancomptable">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">10</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="encoursmaxiplancomptable">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="encourstraitementplancomptable">
<property name="label" translatable="yes">En cours de traitement</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ispubliqueplancomptable">
<property name="label" translatable="yes"> Publique</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="left-padding">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="commentairesplancomptable">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Commentaires :&lt;/b&gt;</property>
<property name="use-markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkToolButton" id="annuler">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-important">True</property>
<property name="label" translatable="yes">Annuler</property>
<property name="use-underline">True</property>
<property name="icon-name">gtk-cancel</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="semaine">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-important">True</property>
<property name="label" translatable="yes">Semaine</property>
<property name="use-underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="validatePlancomptableButton">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="is-important">True</property>
<property name="label" translatable="yes">Valider</property>
<property name="use-underline">True</property>
<property name="icon-name">gtk-apply</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,724 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkWindow" id="window">
<property name="width_request">950</property>
<property name="height_request">500</property>
<property name="can_focus">False</property>
<property name="default_width">1100</property>
<property name="default_height">500</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Mailing&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkPaned" id="paned1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkSeparator" id="separator3">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Liste des clients :</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="liste_client">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="toolbar2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToolButton" id="ajouter_client">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Ajouter</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-add</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton2">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="supprimer_client">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Supprimer</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-delete</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_homogeneous">True</property>
<property name="column_homogeneous">True</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Pièce jointe :</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="pj">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="differe">
<property name="label" translatable="yes">Envoi différé</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="immediat">
<property name="label" translatable="yes">Envoi immédiat</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">differe</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="select_date_envoi">
<property name="label" translatable="yes">Date d'envoi</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">half</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="date_de_lenvoi">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">True</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkSeparator" id="separator2">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="boxmodele">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Titre français :</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="frlibmailing">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Modèle :</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="get_modele">
<property name="label">gtk-find</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Titre anglais :</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="gblibmailing">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Sujet :</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="sujet">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator4">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="text_masculin">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Masculin</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="text_feminin">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Féminin</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="text_pluriel">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Pluriel</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="toolbar3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToolButton" id="apercu_html">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">Aperçu HTML</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-network</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="separatortoolitem1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">False</property>
</packing>
</child>
<child>
<object class="GtkToolItem" id="toolitem1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">En cours de traitement :</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="z_en_cours_traitement">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="valign">center</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator5">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow5">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="signature_expediteur">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Signature :</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">7</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator6">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">8</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="toolbar4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToolButton" id="valider">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">Enregistrer</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-save</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton4">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="send_now">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">Envoyer immédiatement</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-ok</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton6">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="enregistrer_modele">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">Enregistrer comme modèle</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-media-record</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="toolbutton8">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="annuler">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">Annuler</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-cancel</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
</packing>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<placeholder/>
</child>
</object>
</interface>

File diff suppressed because it is too large Load Diff