From 3308dbc4c7cb6ea01c1810b32ca6b78cea720a83 Mon Sep 17 00:00:00 2001 From: houssine Date: Mon, 9 Sep 2019 11:44:54 +0200 Subject: [PATCH 1/3] [FIX] fix email confirmation read only when logged. --- easy_my_coop/view/subscription_template.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easy_my_coop/view/subscription_template.xml b/easy_my_coop/view/subscription_template.xml index 7d4562c..467437d 100644 --- a/easy_my_coop/view/subscription_template.xml +++ b/easy_my_coop/view/subscription_template.xml @@ -86,11 +86,11 @@ -
+
From 2a2744dd6b2ab8a3ab08611c1d4a5cd59ff30c99 Mon Sep 17 00:00:00 2001 From: houssine Date: Mon, 9 Sep 2019 11:47:06 +0200 Subject: [PATCH 2/3] [FIX] fix mix share if statement the compare was made between cooperator type and the short name of the share type. but the cooperator type is the default code and not the short name which is the displayed label --- easy_my_coop/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_my_coop/controllers/main.py b/easy_my_coop/controllers/main.py index 6119736..f646f40 100644 --- a/easy_my_coop/controllers/main.py +++ b/easy_my_coop/controllers/main.py @@ -275,7 +275,7 @@ class WebsiteSubscription(http.Controller): max_amount = max_amount - partner.total_value if company.unmix_share_type: share = self.get_selected_share(kwargs) - if partner.cooperator_type != share.short_name: + if partner.cooperator_type != share.default_code: values = self.fill_values(values, is_company, logged) values["error_msg"] = (_("You can't subscribe two " "different types of share")) From 8078b6cedc4e71f3ee779f01091e56bb57e41d88 Mon Sep 17 00:00:00 2001 From: houssine Date: Mon, 9 Sep 2019 12:22:17 +0200 Subject: [PATCH 3/3] [IMP] set default_code required when is_share is True --- easy_my_coop/view/product_view.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/easy_my_coop/view/product_view.xml b/easy_my_coop/view/product_view.xml index dfddcaf..116b4d7 100644 --- a/easy_my_coop/view/product_view.xml +++ b/easy_my_coop/view/product_view.xml @@ -35,7 +35,17 @@ - + + + product.template.product.form + product.template + + + + {'required': [('is_share', '=', True)]} + + + Share type