[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
This commit is contained in:
Nicolas Martinelli
2016-09-02 11:56:00 +02:00
parent 97da3b99b7
commit cf4cda2bca
@@ -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)