From 252a331781ba86aa57a362c89e2763e32b2c9d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Tue, 11 Jun 2019 18:51:31 +0200 Subject: [PATCH] [FIX] b_emc: Info session not always displayed The info session was not always displayed on the form to become new cooperator, despite a good configuration. --- beesdoo_easy_my_coop/__openerp__.py | 2 +- beesdoo_easy_my_coop/controllers/main.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/beesdoo_easy_my_coop/__openerp__.py b/beesdoo_easy_my_coop/__openerp__.py index 76b7e8b..08abe57 100644 --- a/beesdoo_easy_my_coop/__openerp__.py +++ b/beesdoo_easy_my_coop/__openerp__.py @@ -16,7 +16,7 @@ # Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xml # for the full list 'category': 'Cooperative management', - 'version': '9.0.1.1.1', + 'version': '9.0.1.1.2', # any module necessary for this one to work correctly 'depends': ['beesdoo_base', 'beesdoo_shift', 'easy_my_coop', 'easy_my_coop_eater'], diff --git a/beesdoo_easy_my_coop/controllers/main.py b/beesdoo_easy_my_coop/controllers/main.py index 3e8a587..58e81bd 100644 --- a/beesdoo_easy_my_coop/controllers/main.py +++ b/beesdoo_easy_my_coop/controllers/main.py @@ -6,14 +6,15 @@ from openerp.addons.easy_my_coop.controllers.main import WebsiteSubscription as class WebsiteSubscription(Base): - @http.route() - def display_become_cooperator_page(self, **kwargs): - response = (super(WebsiteSubscription, self) - .display_become_cooperator_page(**kwargs)) + def fill_values(self, values, is_company, logged, load_from_user=False): + values = super(WebsiteSubscription, self).fill_values(values, + is_company, + logged, + load_from_user) cmp = request.env['res.company']._company_default_get() - response.qcontext.update({ + values.update({ 'display_info_session': cmp.display_info_session_confirmation, 'info_session_required': cmp.info_session_confirmation_required, 'info_session_text': cmp.info_session_confirmation_text, }) - return response + return values