Add generic menu link for CORE Office
This commit is contained in:
parent
3e037965ab
commit
8bf513ea72
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue