Display the Store field for Customer Orders
This commit is contained in:
parent
3ece3303db
commit
8095f2c9ea
3 changed files with 20 additions and 1 deletions
|
@ -747,6 +747,13 @@ class MasterView(View):
|
|||
return obj.upc.pretty() if obj.upc else ''
|
||||
return getattr(obj, product_key)
|
||||
|
||||
def render_store(self, obj, field):
|
||||
store = getattr(obj, field)
|
||||
if store:
|
||||
text = "({}) {}".format(store.id, store.name)
|
||||
url = self.request.route_url('stores.view', uuid=store.uuid)
|
||||
return tags.link_to(text, url)
|
||||
|
||||
def render_product(self, obj, field):
|
||||
product = getattr(obj, field)
|
||||
if not product:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue