'Searches negative quants to reconcile for where the quant to reconcile is put'

@api.multi
def _search_quants_to_reconcile(self):

    dom = ['&', '&', '&', '&', ('qty', '<', 0), ('location_id', 'child_of', self.location_id.id), ('product_id', '=', self.product_id.id), ('owner_id', '=', self.owner_id.id), ('id', '!=', self.propagated_from_id.id)]
    if self.package_id.id:
        dom = ((['&'] + dom) + [('package_id', '=', self.package_id.id)])
    if self.lot_id:
        dom = ((['&'] + dom) + ['|', ('lot_id', '=', False), ('lot_id', '=', self.lot_id.id)])
        order = 'lot_id,    in_date'
    else:
        order = 'in_date'
    rounding = self.product_id.uom_id.rounding
    quants = []
    quantity = self.qty
    for quant in self.search(dom, order=order):
        if (float_compare(quantity, abs(quant.qty), precision_rounding=rounding) >= 0):
            quants += [(quant, abs(quant.qty))]
            quantity -= abs(quant.qty)
        elif (float_compare(quantity, 0.0, precision_rounding=rounding) != 0):
            quants += [(quant, quantity)]
            quantity = 0
            break
    return quants
