def getOptionsForProperty(product, property_id): """Returns all options for a given property id. """ if IProductVariant.providedBy(product) == True: product = product.aq_inner.aq_parent pm = IPropertyManagement(product) return pm.getOptionsForProperty(property_id)