diff --git a/product.py b/product.py index 004048b..604dec4 100644 --- a/product.py +++ b/product.py @@ -59,6 +59,8 @@ class Product(StockMixin, metaclass=PoolMeta): @classmethod def _quantity_context(cls, name): context = super(Product, cls)._quantity_context(name) + if not context: + context = {} if name.endswith('number_of_packages'): context['number_of_packages'] = True return context