From c77461e16ff31e7a22007cc258557fe67954c50d Mon Sep 17 00:00:00 2001
From: benjamin <benjamin@le-filament.com>
Date: Wed, 25 Aug 2021 10:54:45 +0200
Subject: [PATCH] [update] button context dashboard UR

---
 models/partner_dashboard_ur.py | 36 ++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/models/partner_dashboard_ur.py b/models/partner_dashboard_ur.py
index f03008b..579c215 100644
--- a/models/partner_dashboard_ur.py
+++ b/models/partner_dashboard_ur.py
@@ -579,6 +579,12 @@ class ScopPartnerDashboardUr(models.Model):
                       ('is_cooperative', '=', True),
                       ('project_status','in',('1_information','2_pre-diagnostic','3_accompagnement','4_adhesion','5_cg','7_abandonne')),
                       ('current_user_ur_id', '=', 'ur_id')],
+            'context': {
+                'default_is_company': True,
+                'default_is_cooperative': True,
+                'default_company_type': 'company',
+                'default_project_status': '1_information'
+            },
         }
 
     # ------------------------------------------------------
@@ -599,6 +605,12 @@ class ScopPartnerDashboardUr(models.Model):
             'domain': [
                 ('is_cooperative', '=', True),
                 ('project_status', 'in', ('1_information','2_pre-diagnostic','3_accompagnement','4_adhesion','5_cg','7_abandonne'))],
+            'context': {
+                'default_is_company': True,
+                'default_is_cooperative': True,
+                'default_company_type': 'company',
+                'default_project_status': '1_information'
+            },
         }
 
     # ------------------------------------------------------
@@ -620,6 +632,12 @@ class ScopPartnerDashboardUr(models.Model):
                 ('is_cooperative', '=', True),
                 ('membership_status', '=', 'member'),
                 ('current_user_ur_id', '=', 'ur_id')],
+            'context': {
+                'default_is_company': True,
+                'default_is_cooperative': True,
+                'default_company_type': 'company',
+                'create': False,
+            },
         }
 
     # ------------------------------------------------------
@@ -640,6 +658,12 @@ class ScopPartnerDashboardUr(models.Model):
             'domain': [
                 ('is_cooperative', '=', True),
                 ('membership_status', '=', 'member')],
+            'context': {
+                'default_is_company': True,
+                'default_is_cooperative': True,
+                'default_company_type': 'company',
+                'create': False,
+            },
         }
 
     # ------------------------------------------------------
@@ -664,6 +688,12 @@ class ScopPartnerDashboardUr(models.Model):
                 ('membership_status', '=', 'member'),
                 ('current_user_ur_id', '=', 'ur_id'),
                 ('revision_next_year', '=', wyear)],
+            'context': {
+                'default_is_company': True,
+                'default_is_cooperative': True,
+                'default_company_type': 'company',
+                'create': False,
+            },
         }
 
     # ------------------------------------------------------
@@ -688,4 +718,10 @@ class ScopPartnerDashboardUr(models.Model):
                 ('is_cooperative', '=', True),
                 ('membership_status', '=', 'member'),
                 ('current_user_ur_id', '=', 'ur_id')],
+            'context': {
+                'default_is_company': True,
+                'default_is_cooperative': True,
+                'default_company_type': 'company',
+                'create': False,
+            },
         }
\ No newline at end of file
-- 
GitLab