mirror of
https://github.com/NaN-tic/trytond-stock_number_of_packages.git
synced 2023-12-14 07:52:52 +01:00
ensure context is defined
This commit is contained in:
parent
6bff02ec16
commit
f24d859d0a
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue