def get_availability(self):
    '\n        Return the availability of the product for this listing\n        '
    Product = Pool().get('product.product')
    with Transaction().set_context(**self.get_availability_context()):
        rv = {'type': 'bucket', 'value': None, 'quantity': None}
        if self.product:
            product = Product(self.product.id)
            rv['quantity'] = product.quantity
            if (rv['quantity'] > 0):
                rv['value'] = 'in_stock'
            else:
                rv['value'] = 'out_of_stock'
        return rv
Return the availability of the product for this listing
def get_availability(self):
    '\n        \n        '
    Product = Pool().get('product.product')
    with Transaction().set_context(**self.get_availability_context()):
        rv = {'type': 'bucket', 'value': None, 'quantity': None}
        if self.product:
            product = Product(self.product.id)
            rv['quantity'] = product.quantity
            if (rv['quantity'] > 0):
                rv['value'] = 'in_stock'
            else:
                rv['value'] = 'out_of_stock'
        return rv