Skip to content
Extraits de code Groupes Projets
Valider 125fcad5 rédigé par jordan's avatar jordan
Parcourir les fichiers

[fix] operation update on context action

parent abccde87
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -1292,22 +1292,21 @@ class ScopPartner(models.Model):
"default_company_type": "company",
"default_project_status": "6_suivi",
}
mycontext = ctx
# Détermine le filtre par défaut pour l'affichage
filtre = self.env.user.company_id.ur_id.partner_filter
if filtre == "1":
mycontext = ctx.update({"search_default_is_adherent": True})
ctx.update({"search_default_is_adherent": True})
elif filtre == "2":
mycontext = ctx.update({"search_default_my_ur_adherent": True})
ctx.update({"search_default_my_ur_adherent": True})
elif filtre == "3":
mycontext = ctx.update({"search_default_is_federation_com": True})
ctx.update({"search_default_is_federation_com": True})
elif filtre == "4":
mycontext = ctx.update({"search_default_is_federation_indus": True})
ctx.update({"search_default_is_federation_indus": True})
elif filtre == "5":
mycontext = ctx.update({"search_default_my_is_federation_btp": True})
ctx.update({"search_default_my_is_federation_btp": True})
elif filtre == "6":
mycontext = ctx.update({"search_default_my_is_federation_cae": True})
ctx.update({"search_default_my_is_federation_cae": True})
return {
"name": "Coopératives",
......@@ -1332,7 +1331,7 @@ class ScopPartner(models.Model):
("is_cooperative", "=", True),
("project_status", "=", "6_suivi"),
],
"context": mycontext,
"context": ctx,
}
# ------------------------------------------------------
......@@ -1345,12 +1344,11 @@ class ScopPartner(models.Model):
"default_company_type": "company",
"default_project_status": "1_information",
}
mycontext = ctx
# Détermine le filtre par défaut pour l'affichage
filtre = self.env.user.company_id.ur_id.partner_filter
if filtre == "2":
mycontext = ctx.update({"search_default_my_ur": True})
ctx.update({"search_default_my_ur": True})
return {
"name": "Prospects",
......@@ -1390,7 +1388,7 @@ class ScopPartner(models.Model):
),
),
],
"context": mycontext,
"context": ctx,
}
# ------------------------------------------------------
......@@ -1404,12 +1402,11 @@ class ScopPartner(models.Model):
"default_company_type": "company",
"default_project_status": "1_information",
}
mycontext = ctx
# Détermine le filtre par défaut pour l'affichage
filtre = self.env.user.company_id.ur_id.partner_filter
if filtre == "2":
mycontext = ctx.update({"search_default_my_ur_adherent": True})
ctx.update({"search_default_my_ur_adherent": True})
return {
"name": "Tous les organismes",
......@@ -1431,5 +1428,5 @@ class ScopPartner(models.Model):
],
"target": "current",
"domain": [("is_cooperative", "=", True)],
"context": mycontext,
"context": ctx,
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter