Skip to content
Snippets Groups Projects
Commit c9e3a136 authored by Benjamin's avatar Benjamin
Browse files

correction erreur algo

parent 0ab9dacd
No related branches found
No related tags found
No related merge requests found
......@@ -106,8 +106,7 @@ class CgscopRigaOdooImport(models.Model):
})
# Vérification de la ligne dans la base
line = model_obj.search([
['id_riga', '=', row[primary_key]],
['is_cooperative', '=', True]])
['id_riga', '=', row[primary_key]]])
# Si il y a un enregistrement, on met à jour
if line:
line.write(vals)
......@@ -115,7 +114,8 @@ class CgscopRigaOdooImport(models.Model):
else:
# Check d'un organisme dans la base
partner = self.env['res.partner'].search([
['id_riga', '=', row[header_key]]])
['id_riga', '=', row[header_key]],
['is_cooperative', '=', True]])
# Si l'organisme existe, on crée un enregistrement
if partner:
vals.update({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment