From 0bf3fcfba4ceefd0bc71ae2988c30858600f24a9 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 14 Mar 2020 21:03:48 -0500 Subject: [PATCH] Add support for CORE-POS jump button when viewing Department --- rattail_demo/web/views/__init__.py | 2 +- rattail_demo/web/views/departments.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 rattail_demo/web/views/departments.py diff --git a/rattail_demo/web/views/__init__.py b/rattail_demo/web/views/__init__.py index 4364daf..4828447 100644 --- a/rattail_demo/web/views/__init__.py +++ b/rattail_demo/web/views/__init__.py @@ -18,7 +18,7 @@ def includeme(config): config.include('tailbone.views.brands') config.include('tailbone.views.customers') config.include('tailbone.views.datasync') - config.include('tailbone.views.departments') + config.include('rattail_demo.web.views.departments') config.include('rattail_demo.web.views.email') config.include('rattail_demo.web.views.employees') config.include('tailbone.views.families') diff --git a/rattail_demo/web/views/departments.py b/rattail_demo/web/views/departments.py new file mode 100644 index 0000000..216a931 --- /dev/null +++ b/rattail_demo/web/views/departments.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8; -*- +""" +Department views +""" + +from tailbone.views import departments as base +# NOTE: the main point of this module is to bring this in +from tailbone_corepos.views.departments import DepartmentView + + +def includeme(config): + + # autocomplete + config.add_route('departments.autocomplete', '/departments/autocomplete') + config.add_view(base.DepartmentsAutocomplete, route_name='departments.autocomplete', + renderer='json', permission='departments.list') + + DepartmentView.defaults(config)