'This function computes the different product quantities for the given package'

def _get_all_products_quantities(self):

    res = {}
    for quant in self._get_contained_quants():
        if (quant.product_id not in res):
            res[quant.product_id] = 0
        res[quant.product_id] += quant.qty
    return res
