'Custom lookup method for item rows, does a
left join with the brand. Parameters
key and fields are not used, but are kept for API
compatibility reasons.
@param values: the supply_item IDs'

def custom_lookup_rows(self, key, values, fields=[]):

    db = current.db
    itable = current.s3db.supply_item
    btable = db.supply_brand
    left = btable.on((btable.id == itable.brand_id))
    qty = len(values)
    if (qty == 1):
        query = (itable.id == values[0])
        limitby = (0, 1)
    else:
        query = itable.id.belongs(values)
        limitby = (0, qty)
    rows = db(query).select(left=left, limitby=limitby, *self.fields)
    self.queries += 1
    return rows
