2 In order to test conversation of UOM,
4 I convert Grams into TON with price.
6 !python {model: product.uom}: |
7 from_uom_id = ref("product_uom_gram")
8 to_uom_id = ref("product_uom_ton")
11 price = self._compute_price(cr, uid, from_uom_id, price, to_uom_id)
12 qty = self._compute_qty(cr, uid, from_uom_id, qty, to_uom_id)
13 assert qty == 1.02, "Qty is not correspond."
14 assert price == 2000000.0, "Price is not correspond."