'This function return inventory lines for exausted products
:param products: products With Selected Filter.
:param quant_products: products available in stock_quants'

def _get_exhausted_inventory_line(self, products, quant_products):

    vals = []
    exhausted_domain = [('type', 'not    in', ('service', 'consu', 'digital'))]
    if products:
        exhausted_products = (products - quant_products)
        exhausted_domain += [('id', 'in', exhausted_products.ids)]
    else:
        exhausted_domain += [('id', 'not    in', quant_products.ids)]
    exhausted_products = self.env['product.product'].search(exhausted_domain)
    for product in exhausted_products:
        vals.append({'inventory_id': self.id, 'product_id': product.id, 'location_id': self.location_id.id})
    return vals
