From e974e1fbead436e5b77df428f5117af3688d8893 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 30 Jan 2014 10:23:08 +0100 Subject: [PATCH] [REM] remove disable_db and ensure_db() from addons bzr revid: fme@openerp.com-20140130092308-s24a7h2mhzuaasf1 --- addons/auth_oauth/controllers/main.py | 2 -- addons/auth_signup/controllers/main.py | 2 -- addons/mass_mailing/controllers/main.py | 1 - addons/payment_adyen/controllers/main.py | 1 - addons/payment_ogone/controllers/main.py | 1 - addons/payment_paypal/controllers/main.py | 3 --- addons/payment_transfer/controllers/main.py | 1 - 7 files changed, 11 deletions(-) diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index e932b6ca1c0..e660fd8363b 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -68,8 +68,6 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home): @http.route() def web_login(self, *args, **kw): - http.ensure_db(with_registry=True) - request.disable_db = False providers = self.list_providers() response = super(OAuthLogin, self).web_login(*args, **kw) diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py index 7a517a0ef8c..2db1e3dff65 100644 --- a/addons/auth_signup/controllers/main.py +++ b/addons/auth_signup/controllers/main.py @@ -34,8 +34,6 @@ class Home(openerp.addons.web.controllers.main.Home): @http.route() def web_login(self, *args, **kw): - http.ensure_db(with_registry=True) - mode = request.params.get('mode') qcontext = request.params.copy() response = webmain.render_bootstrap_template(request.session.db, 'auth_signup.signup', qcontext, lazy=True) diff --git a/addons/mass_mailing/controllers/main.py b/addons/mass_mailing/controllers/main.py index 9f5f88327e9..046084621c7 100644 --- a/addons/mass_mailing/controllers/main.py +++ b/addons/mass_mailing/controllers/main.py @@ -6,7 +6,6 @@ class MassMailController(http.Controller): @http.route('/mail/track//blank.gif', type='http', auth='none') def track_mail_open(self, mail_id): """ Email tracking. """ - request.disable_db = False mail_mail_stats = request.registry.get('mail.mail.statistics') mail_mail_stats.set_opened(request.cr, SUPERUSER_ID, mail_mail_ids=[mail_id]) return "data:image/gif;base64,R0lGODlhAQABAIAAANvf7wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" diff --git a/addons/payment_adyen/controllers/main.py b/addons/payment_adyen/controllers/main.py index ad5a68d2327..e6e74eba9a7 100644 --- a/addons/payment_adyen/controllers/main.py +++ b/addons/payment_adyen/controllers/main.py @@ -22,7 +22,6 @@ class AdyenController(http.Controller): ], type='http', auth='none') def adyen_return(self, pspReference, **post): """ Paypal IPN.""" - request.disable_db = False post["pspReference"] = pspReference _logger.info('Beginning Adyen form_feedback with post data %s', pprint.pformat(post)) # debug request.registry['payment.transaction'].form_feedback(request.cr, SUPERUSER_ID, post, 'adyen', context=request.context) diff --git a/addons/payment_ogone/controllers/main.py b/addons/payment_ogone/controllers/main.py index 6ffc0661767..f93c913ed1d 100644 --- a/addons/payment_ogone/controllers/main.py +++ b/addons/payment_ogone/controllers/main.py @@ -23,7 +23,6 @@ class OgoneController(http.Controller): ], type='http', auth='none') def ogone_form_feedback(self, **post): """ Ogone contacts using GET, at least for accept """ - request.disable_db = False _logger.info('Ogone: entering form_feedback with post data %s', pprint.pformat(post)) # debug cr, uid, context = request.cr, SUPERUSER_ID, request.context request.registry['payment.transaction'].form_feedback(cr, uid, post, 'ogone', context=context) diff --git a/addons/payment_paypal/controllers/main.py b/addons/payment_paypal/controllers/main.py index ce43314498f..967059e59ae 100644 --- a/addons/payment_paypal/controllers/main.py +++ b/addons/payment_paypal/controllers/main.py @@ -56,7 +56,6 @@ class PaypalController(http.Controller): @http.route('/payment/paypal/ipn/', type='http', auth='none', methods=['POST']) def paypal_ipn(self, **post): """ Paypal IPN. """ - request.disable_db = False _logger.info('Beginning Paypal IPN form_feedback with post data %s', pprint.pformat(post)) # debug self.paypal_validate_data(**post) return '' @@ -64,7 +63,6 @@ class PaypalController(http.Controller): @http.route('/payment/paypal/dpn', type='http', auth="none", methods=['POST']) def paypal_dpn(self, **post): """ Paypal DPN """ - request.disable_db = False _logger.info('Beginning Paypal DPN form_feedback with post data %s', pprint.pformat(post)) # debug return_url = self._get_return_url(**post) self.paypal_validate_data(**post) @@ -73,7 +71,6 @@ class PaypalController(http.Controller): @http.route('/payment/paypal/cancel', type='http', auth="none") def paypal_cancel(self, **post): """ When the user cancels its Paypal payment: GET on this route """ - request.disable_db = False cr, uid, context = request.cr, SUPERUSER_ID, request.context _logger.info('Beginning Paypal cancel with post data %s', pprint.pformat(post)) # debug return_url = self._get_return_url(**post) diff --git a/addons/payment_transfer/controllers/main.py b/addons/payment_transfer/controllers/main.py index 9f5152e442a..917ac63cc81 100644 --- a/addons/payment_transfer/controllers/main.py +++ b/addons/payment_transfer/controllers/main.py @@ -16,7 +16,6 @@ class OgoneController(http.Controller): '/payment/transfer/feedback', ], type='http', auth='none') def transfer_form_feedback(self, **post): - request.disable_db = False cr, uid, context = request.cr, SUPERUSER_ID, request.context _logger.info('Beginning form_feedback with post data %s', pprint.pformat(post)) # debug request.registry['payment.transaction'].form_feedback(cr, uid, post, 'transfer', context)