From cf4cda2bca3ae09e7516d50bf9a352dae21a9859 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 2 Sep 2016 11:51:50 +0200 Subject: [PATCH] [FIX] payment_paypal: set Paypal if not website installed Since commit 2ab68047, the Paypal link can be sent in an invoice as it was the case before. However, in order to be able to save the Paypal account in the accounting settings, the Paypal account must be website-published. If the module `website_payments` is not installed, this is not possible. We remove this condition, since it should be possible tu use the Paypal payment method without installing the whole website. opw-686216 --- addons/payment_paypal/models/res_company.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/payment_paypal/models/res_company.py b/addons/payment_paypal/models/res_company.py index 83ac270be0c..adbb328d562 100644 --- a/addons/payment_paypal/models/res_company.py +++ b/addons/payment_paypal/models/res_company.py @@ -10,7 +10,6 @@ class ResCompany(osv.Model): Acquirer = self.pool['payment.acquirer'] company_id = self.pool['res.users'].browse(cr, uid, uid, context=context).company_id.id paypal_ids = Acquirer.search(cr, uid, [ - ('website_published', '=', True), ('name', 'ilike', 'paypal'), ('company_id', '=', company_id), ], limit=1, context=context) @@ -24,7 +23,6 @@ class ResCompany(osv.Model): company_id = self.pool['res.users'].browse(cr, uid, uid, context=context).company_id.id paypal_account = self.browse(cr, uid, id, context=context).paypal_account paypal_ids = Acquirer.search(cr, uid, [ - ('website_published', '=', True), ('paypal_email_account', '=', paypal_account), ('company_id', '=', company_id), ], context=context)