diff options
| author | tbe-odoo <tbe@odoo.com> | 2017-08-29 16:50:48 +0200 |
|---|---|---|
| committer | tbe-odoo <tbe@odoo.com> | 2017-08-29 17:16:42 +0200 |
| commit | be650c5979d6d427ad79bc23f0edc1d10290f881 (patch) | |
| tree | 8baecb371dbf39501d5cbd9825c09a7aa214449d /addons/website_payment | |
| parent | 2a2a1c7b2843fc6fe0c82583120ce100fa4068fa (diff) | |
[IMP] Fixing the code to fit the reviews
Diffstat (limited to 'addons/website_payment')
| -rw-r--r-- | addons/website_payment/models/website.py | 3 | ||||
| -rw-r--r-- | addons/website_payment/views/website_payment_templates.xml | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/addons/website_payment/models/website.py b/addons/website_payment/models/website.py index b6b67e60708..ff2159f384d 100644 --- a/addons/website_payment/models/website.py +++ b/addons/website_payment/models/website.py @@ -11,5 +11,4 @@ class Website(models.Model): def payment_icons(self): """ This function returns the list of payment icons which are supported by payment acquirers that are published """ - icons = self.env['payment.icon'].sudo().search([('acquirer_ids', '!=', False)]) - return [icon for icon in icons if any(acq.website_published for acq in icon.acquirer_ids)] + return self.env['payment.icon'].sudo().search([('acquirer_ids.website_published', '=', True)]) diff --git a/addons/website_payment/views/website_payment_templates.xml b/addons/website_payment/views/website_payment_templates.xml index c7083c140e9..f81ab5e6e50 100644 --- a/addons/website_payment/views/website_payment_templates.xml +++ b/addons/website_payment/views/website_payment_templates.xml @@ -6,7 +6,7 @@ <ul class="payment_method_list list-inline"> <t t-foreach="request.website.payment_icons()" t-as="icon"> <li> - <span t-field="icon.image_small" t-options='{"widget": "image", "alt-field": "name"}' /> + <span t-field="icon.image" t-options='{"widget": "image", "alt-field": "name"}' /> </li> </t> </ul> |
