Commit 86288ee2 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Add resource_reference to InventoryBrain (used by a customer but may be useful for others too).

parent 5da1eb5e
......@@ -144,6 +144,12 @@ class InventoryListBrain(ComputedAttributeGetItemCompatibleMixin):
return resource.relative_url
resource_relative_url = ComputedAttribute(getResourceRelativeUrl, 1)
def getResourceReference(self):
resource = self.getResourceValue()
if resource is not None:
return resource.getReference()
resource_reference = ComputedAttribute(getResourceReference, 1)
def getListItemUrl(self, cname_id, selection_index, selection_name):
"""Returns the URL for column `cname_id`. Used by ListBox
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment