Add hover text for vendor ID column of pricing batch row grid

This commit is contained in:
Lance Edgar 2021-08-29 19:52:44 -05:00
parent c2ea1be83f
commit 54f1a52ed0

View file

@ -210,10 +210,11 @@ class PricingBatchView(BatchMasterView):
g.set_renderer('true_margin', self.render_true_margin) g.set_renderer('true_margin', self.render_true_margin)
def render_vendor_id(self, row, field): def render_vendor_id(self, row, field):
vendor_id = row.vendor.id if row.vendor else None vendor = row.vendor
if not vendor_id: if not vendor:
return "" return
return vendor_id text = vendor.id or "(no id)"
return HTML.tag('span', c=text, title=vendor.name)
def render_subdepartment_number(self, row, field): def render_subdepartment_number(self, row, field):
if row.subdepartment_number: if row.subdepartment_number: