Ensure quantity from context is a number
The quantity compares with other quantity so it fails on Python3 if quantity is None. issue6885 review41641002
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@ class Product:
|
||||
|
||||
@classmethod
|
||||
def get_purchase_price_uom(cls, products, name):
|
||||
quantity = Transaction().context.get('quantity', 0)
|
||||
quantity = Transaction().context.get('quantity') or 0
|
||||
return cls.get_purchase_price(products, quantity=quantity)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user