[FIX] website_sale_picking: correctly filter out invalid providers
The 'onsite' payment provider shouldn't be shown to the user if the cart/order only contains services (or if there are no onsite carriers). The logic was there but the filtering didn't correctly update the values. opw-3437107 closes odoo/odoo#131177 X-original-commit: 78cd9a7ab5fb860021a906400a1907b1d8b45be2 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -37,7 +37,7 @@ class PaymentProvider(models.Model):
|
||||
product.type in ('consu', 'product')
|
||||
for product in order.order_line.product_id
|
||||
):
|
||||
compatible_providers.filtered(
|
||||
compatible_providers = compatible_providers.filtered(
|
||||
lambda p: p.code != 'custom' or p.custom_mode != 'onsite'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user