Unsupported operand type(s) for /=: 'float' and 'decimal.Decimal' when the sale consists the kits
If the sale consists the kits, after pressing Quote button I get the next error:
File "/trytond/modules/product_kit/common.py", line 122, in quote
def quote(cls, records):
^^
File "/trytond/modules/product_kit/common.py", line 145, in set_components
if line.product and line.product.components_used:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/modules/product_kit/common.py", line 313, in set_price_ratio
else:
^^
TypeError: unsupported operand type(s) for /=: 'float' and 'decimal.Decimal'
Fault: unsupported operand type(s) for /=: 'float' and 'decimal.Decimal'
The problem is in the row 314: ratio = 1 / len(components) <-- ratio must be decimal
Version of tryton_kit is 6.6.4
Edited by Cédric Krier