diff --git a/tailbone/views/master.py b/tailbone/views/master.py index 79f537e0..be67eaa5 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2020 Lance Edgar +# Copyright © 2010-2021 Lance Edgar # # This file is part of Rattail. # @@ -953,8 +953,9 @@ class MasterView(View): vendor = getattr(obj, field) if not vendor: return "" - if vendor.id: - text = "({}) {}".format(vendor.id, vendor.name) + short = vendor.id or vendor.abbreviation + if short: + text = "({}) {}".format(short, vendor.name) else: text = six.text_type(vendor) url = self.request.route_url('vendors.view', uuid=vendor.uuid) diff --git a/tailbone/views/purchasing/batch.py b/tailbone/views/purchasing/batch.py index e8bc5ba7..d83beb6f 100644 --- a/tailbone/views/purchasing/batch.py +++ b/tailbone/views/purchasing/batch.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2020 Lance Edgar +# Copyright © 2010-2021 Lance Edgar # # This file is part of Rattail. # @@ -409,14 +409,6 @@ class PurchasingBatchView(BatchMasterView): url = self.request.route_url('purchases.view', uuid=purchase.uuid) return tags.link_to(text, url) - def render_vendor(self, batch, field): - vendor = batch.vendor - if not vendor: - return "" - text = "({}) {}".format(vendor.id, vendor.name) - url = self.request.route_url('vendors.view', uuid=vendor.uuid) - return tags.link_to(text, url) - def render_vendor_email(self, batch, field): if batch.vendor.email: return batch.vendor.email.address