Add basic "resolve" support for person, product from new custorder

This commit is contained in:
Lance Edgar 2021-12-23 20:24:43 -06:00
parent 1b0d6581db
commit 82dfce6f81
8 changed files with 474 additions and 32 deletions

View file

@ -290,6 +290,12 @@ class MasterView(View):
return self.request.has_perm('{}.{}'.format(
self.get_permission_prefix(), name))
def has_any_perm(self, *names):
for name in names:
if self.has_perm(name):
return True
return False
@classmethod
def get_config_url(cls):
if hasattr(cls, 'config_url'):
@ -801,7 +807,8 @@ class MasterView(View):
return
text = six.text_type(pending)
url = self.request.route_url('pending_products.view', uuid=pending.uuid)
return tags.link_to(text, url)
return tags.link_to(text, url,
class_='has-background-warning')
def render_vendor(self, obj, field):
vendor = getattr(obj, field)