Register integration menu via provider
This commit is contained in:
parent
c871d21b2c
commit
29d9654023
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2022 Lance Edgar
|
# Copyright © 2010-2023 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -28,7 +28,6 @@ from rattail_corepos.config import core_office_url
|
||||||
|
|
||||||
|
|
||||||
def make_corepos_menu(request):
|
def make_corepos_menu(request):
|
||||||
url = request.route_url
|
|
||||||
|
|
||||||
corepos_menu = {
|
corepos_menu = {
|
||||||
'title': "CORE-POS",
|
'title': "CORE-POS",
|
||||||
|
@ -40,37 +39,37 @@ def make_corepos_menu(request):
|
||||||
'items': [
|
'items': [
|
||||||
{
|
{
|
||||||
'title': "Customers (Legacy)",
|
'title': "Customers (Legacy)",
|
||||||
'url': url('corepos.customers'),
|
'route': 'corepos.customers',
|
||||||
'perm': 'corepos.customers.list',
|
'perm': 'corepos.customers.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Members (Legacy)",
|
'title': "Members (Legacy)",
|
||||||
'url': url('corepos.members'),
|
'route': 'corepos.members',
|
||||||
'perm': 'corepos.members.list',
|
'perm': 'corepos.members.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Suspensions",
|
'title': "Suspensions",
|
||||||
'url': url('corepos.suspensions'),
|
'route': 'corepos.suspensions',
|
||||||
'perm': 'corepos.suspensions.list',
|
'perm': 'corepos.suspensions.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Member Types",
|
'title': "Member Types",
|
||||||
'url': url('corepos.member_types'),
|
'route': 'corepos.member_types',
|
||||||
'perm': 'corepos.member_types.list',
|
'perm': 'corepos.member_types.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Employees",
|
'title': "Employees",
|
||||||
'url': url('corepos.employees'),
|
'route': 'corepos.employees',
|
||||||
'perm': 'corepos.employees.list',
|
'perm': 'corepos.employees.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Users",
|
'title': "Users",
|
||||||
'url': url('corepos.users'),
|
'route': 'corepos.users',
|
||||||
'perm': 'corepos.users.list',
|
'perm': 'corepos.users.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "User Groups",
|
'title': "User Groups",
|
||||||
'url': url('corepos.user_groups'),
|
'route': 'corepos.user_groups',
|
||||||
'perm': 'corepos.user_groups.list',
|
'perm': 'corepos.user_groups.list',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -81,54 +80,54 @@ def make_corepos_menu(request):
|
||||||
'items': [
|
'items': [
|
||||||
{
|
{
|
||||||
'title': "Products",
|
'title': "Products",
|
||||||
'url': url('corepos.products'),
|
'route': 'corepos.products',
|
||||||
'perm': 'corepos.products.list',
|
'perm': 'corepos.products.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Product Flags",
|
'title': "Product Flags",
|
||||||
'url': url('corepos.product_flags'),
|
'route': 'corepos.product_flags',
|
||||||
'perm': 'corepos.product_flags.list',
|
'perm': 'corepos.product_flags.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Like Codes",
|
'title': "Like Codes",
|
||||||
'url': url('corepos.like_codes'),
|
'route': 'corepos.like_codes',
|
||||||
'perm': 'corepos.like_codes.list',
|
'perm': 'corepos.like_codes.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Scale Items",
|
'title': "Scale Items",
|
||||||
'url': url('corepos.scale_items'),
|
'route': 'corepos.scale_items',
|
||||||
'perm': 'corepos.scale_items.list',
|
'perm': 'corepos.scale_items.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Origins",
|
'title': "Origins",
|
||||||
'url': url('corepos.origins'),
|
'route': 'corepos.origins',
|
||||||
'perm': 'corepos.origins.list',
|
'perm': 'corepos.origins.list',
|
||||||
},
|
},
|
||||||
{'type': 'sep'},
|
{'type': 'sep'},
|
||||||
{
|
{
|
||||||
'title': "Super Departments",
|
'title': "Super Departments",
|
||||||
'url': url('corepos.super_departments'),
|
'route': 'corepos.super_departments',
|
||||||
'perm': 'corepos.super_departments.list',
|
'perm': 'corepos.super_departments.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Departments",
|
'title': "Departments",
|
||||||
'url': url('corepos.departments'),
|
'route': 'corepos.departments',
|
||||||
'perm': 'corepos.departments.list',
|
'perm': 'corepos.departments.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Subdepartments",
|
'title': "Subdepartments",
|
||||||
'url': url('corepos.subdepartments'),
|
'route': 'corepos.subdepartments',
|
||||||
'perm': 'corepos.subdepartments.list',
|
'perm': 'corepos.subdepartments.list',
|
||||||
},
|
},
|
||||||
{'type': 'sep'},
|
{'type': 'sep'},
|
||||||
{
|
{
|
||||||
'title': "Batches",
|
'title': "Batches",
|
||||||
'url': url('corepos.batches'),
|
'route': 'corepos.batches',
|
||||||
'perm': 'corepos.batches.list',
|
'perm': 'corepos.batches.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Batch Types",
|
'title': "Batch Types",
|
||||||
'url': url('corepos.batch_types'),
|
'route': 'corepos.batch_types',
|
||||||
'perm': 'corepos.batch_types.list',
|
'perm': 'corepos.batch_types.list',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -139,17 +138,17 @@ def make_corepos_menu(request):
|
||||||
'items': [
|
'items': [
|
||||||
{
|
{
|
||||||
'title': "Vendors",
|
'title': "Vendors",
|
||||||
'url': url('corepos.vendors'),
|
'route': 'corepos.vendors',
|
||||||
'perm': 'corepos.vendors.list',
|
'perm': 'corepos.vendors.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Vendor Items",
|
'title': "Vendor Items",
|
||||||
'url': url('corepos.vendor_items'),
|
'route': 'corepos.vendor_items',
|
||||||
'perm': 'corepos.vendor_items.list',
|
'perm': 'corepos.vendor_items.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Purchase Orders",
|
'title': "Purchase Orders",
|
||||||
'url': url('corepos.purchase_orders'),
|
'route': 'corepos.purchase_orders',
|
||||||
'perm': 'corepos.purchase_orders.list',
|
'perm': 'corepos.purchase_orders.list',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -160,17 +159,17 @@ def make_corepos_menu(request):
|
||||||
'items': [
|
'items': [
|
||||||
{
|
{
|
||||||
'title': "Tax Rates",
|
'title': "Tax Rates",
|
||||||
'url': url('corepos.taxrates'),
|
'route': 'corepos.taxrates',
|
||||||
'perm': 'corepos.taxrates.list',
|
'perm': 'corepos.taxrates.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "House Coupons",
|
'title': "House Coupons",
|
||||||
'url': url('corepos.house_coupons'),
|
'route': 'corepos.house_coupons',
|
||||||
'perm': 'corepos.house_coupons.list',
|
'perm': 'corepos.house_coupons.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Transaction Details",
|
'title': "Transaction Details",
|
||||||
'url': url('corepos.transaction_details'),
|
'route': 'corepos.transaction_details',
|
||||||
'perm': 'corepos.transaction_details.list',
|
'perm': 'corepos.transaction_details.list',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -181,17 +180,17 @@ def make_corepos_menu(request):
|
||||||
'items': [
|
'items': [
|
||||||
{
|
{
|
||||||
'title': "Stores",
|
'title': "Stores",
|
||||||
'url': url('corepos.stores'),
|
'route': 'corepos.stores',
|
||||||
'perm': 'corepos.stores.list',
|
'perm': 'corepos.stores.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Parameters",
|
'title': "Parameters",
|
||||||
'url': url('corepos.parameters'),
|
'route': 'corepos.parameters',
|
||||||
'perm': 'corepos.parameters.list',
|
'perm': 'corepos.parameters.list',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': "Table Sync Rules",
|
'title': "Table Sync Rules",
|
||||||
'url': url('corepos.table_sync_rules'),
|
'route': 'corepos.table_sync_rules',
|
||||||
'perm': 'corepos.table_sync_rules.list',
|
'perm': 'corepos.table_sync_rules.list',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2022 Lance Edgar
|
# Copyright © 2010-2023 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -152,3 +152,7 @@ class TailboneCorePosProvider(TailboneProvider):
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def make_integration_menu(self, request, **kwargs):
|
||||||
|
from tailbone_corepos.menus import make_corepos_menu
|
||||||
|
return make_corepos_menu(request)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2022 Lance Edgar
|
# Copyright © 2010-2023 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -26,6 +26,8 @@ Web Views
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def includeme(config):
|
||||||
|
|
||||||
|
# native view supplements
|
||||||
config.include('tailbone_corepos.views.customers')
|
config.include('tailbone_corepos.views.customers')
|
||||||
config.include('tailbone_corepos.views.departments')
|
config.include('tailbone_corepos.views.departments')
|
||||||
config.include('tailbone_corepos.views.members')
|
config.include('tailbone_corepos.views.members')
|
||||||
|
@ -34,3 +36,6 @@ def includeme(config):
|
||||||
config.include('tailbone_corepos.views.stores')
|
config.include('tailbone_corepos.views.stores')
|
||||||
config.include('tailbone_corepos.views.subdepartments')
|
config.include('tailbone_corepos.views.subdepartments')
|
||||||
config.include('tailbone_corepos.views.vendors')
|
config.include('tailbone_corepos.views.vendors')
|
||||||
|
|
||||||
|
# CORE-POS tables
|
||||||
|
config.include('tailbone_corepos.views.corepos')
|
||||||
|
|
Loading…
Reference in a new issue