Trying to resolve error on creating client 2
This commit is contained in:
parent
015943bdfa
commit
6aebf00653
1 changed files with 12 additions and 3 deletions
|
|
@ -2444,9 +2444,18 @@ class SageConnector:
|
||||||
client.CT_Intitule = intitule
|
client.CT_Intitule = intitule
|
||||||
logger.debug(f" ✅ CT_Intitule: '{intitule}'")
|
logger.debug(f" ✅ CT_Intitule: '{intitule}'")
|
||||||
|
|
||||||
# 2. Type (OBLIGATOIRE - 0=Client)
|
# 2. Qualité (OBLIGATOIRE pour distinguer Client/Fournisseur)
|
||||||
|
# CT_Qualite : 0=Aucune, 1=Client uniquement, 2=Fournisseur uniquement, 3=Client ET Fournisseur
|
||||||
|
try:
|
||||||
|
client.CT_Qualite = 1 # 1 = Client uniquement
|
||||||
|
logger.debug(" ✅ CT_Qualite: 1 (Client)")
|
||||||
|
except AttributeError:
|
||||||
|
# Fallback sur CT_Type si CT_Qualite n'existe pas
|
||||||
|
try:
|
||||||
client.CT_Type = 0
|
client.CT_Type = 0
|
||||||
logger.debug(" ✅ CT_Type: 0 (Client)")
|
logger.debug(" ✅ CT_Type: 0 (Client - ancienne version)")
|
||||||
|
except AttributeError:
|
||||||
|
logger.warning(" ⚠️ Ni CT_Qualite ni CT_Type disponible")
|
||||||
|
|
||||||
# 3. Compte collectif
|
# 3. Compte collectif
|
||||||
if compte:
|
if compte:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue