diff --git a/rattail/pyramid/views/products.py b/rattail/pyramid/views/products.py index a39802b2..9d3e3673 100644 --- a/rattail/pyramid/views/products.py +++ b/rattail/pyramid/views/products.py @@ -268,7 +268,15 @@ class CreateProductsBatch(ProductsGrid): } return render_to_response('/progress.mako', kwargs, request=self.request) - providers = [(x.name, x.description) for x in batches.iter_providers()] + enabled = edbob.config.get('rattail.pyramid', 'batches.providers') + if enabled: + enabled = enabled.split() + + providers = [] + for provider in batches.iter_providers(): + if not enabled or provider.name in enabled: + providers.append((provider.name, provider.description)) + return {'providers': providers}