Add generic menu link for CORE Office

This commit is contained in:
Lance Edgar 2020-09-20 18:14:28 -05:00
parent 3e037965ab
commit 8bf513ea72

View file

@ -24,6 +24,8 @@
Common menus for CORE-POS Common menus for CORE-POS
""" """
from rattail_corepos.config import core_office_url
def make_corepos_menu(request): def make_corepos_menu(request):
url = request.route_url url = request.route_url
@ -108,4 +110,15 @@ def make_corepos_menu(request):
], ],
} }
office_url = core_office_url(request.rattail_config)
if office_url:
corepos_menu['items'].extend([
{'type': 'sep'},
{
'title': "Go to CORE Office",
'url': '{}/'.format(office_url),
'target': '_blank',
},
])
return corepos_menu return corepos_menu