feat: add view for CORE Custom Receipt Lines (op.customReceipt
)
This commit is contained in:
parent
a7ff4e4ffc
commit
25d1eaa816
|
@ -202,6 +202,11 @@ def make_corepos_menu(request):
|
||||||
'route': 'corepos.tenders',
|
'route': 'corepos.tenders',
|
||||||
'perm': 'corepos.tenders.list',
|
'perm': 'corepos.tenders.list',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'title': "Custom Receipt Lines",
|
||||||
|
'route': 'corepos.custom_receipt_lines',
|
||||||
|
'perm': 'corepos.custom_receipt_lines.list',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2023 Lance Edgar
|
# Copyright © 2010-2024 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -48,6 +48,7 @@ def defaults(config, **kwargs):
|
||||||
config.include(mod('tailbone_corepos.views.corepos.customers'))
|
config.include(mod('tailbone_corepos.views.corepos.customers'))
|
||||||
config.include(mod('tailbone_corepos.views.corepos.employees'))
|
config.include(mod('tailbone_corepos.views.corepos.employees'))
|
||||||
config.include(mod('tailbone_corepos.views.corepos.coupons'))
|
config.include(mod('tailbone_corepos.views.corepos.coupons'))
|
||||||
|
config.include(mod('tailbone_corepos.views.corepos.receipts'))
|
||||||
config.include(mod('tailbone_corepos.views.corepos.tenders'))
|
config.include(mod('tailbone_corepos.views.corepos.tenders'))
|
||||||
config.include(mod('tailbone_corepos.views.corepos.stockpurchases'))
|
config.include(mod('tailbone_corepos.views.corepos.stockpurchases'))
|
||||||
config.include(mod('tailbone_corepos.views.corepos.taxrates'))
|
config.include(mod('tailbone_corepos.views.corepos.taxrates'))
|
||||||
|
|
50
tailbone_corepos/views/corepos/receipts.py
Normal file
50
tailbone_corepos/views/corepos/receipts.py
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# -*- coding: utf-8; -*-
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# Rattail -- Retail Software Framework
|
||||||
|
# Copyright © 2010-2024 Lance Edgar
|
||||||
|
#
|
||||||
|
# This file is part of Rattail.
|
||||||
|
#
|
||||||
|
# Rattail is free software: you can redistribute it and/or modify it under the
|
||||||
|
# terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# Rattail. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
"""
|
||||||
|
CORE POS receipt views
|
||||||
|
"""
|
||||||
|
|
||||||
|
from corepos.db.office_op.model import CustomReceiptLine
|
||||||
|
|
||||||
|
from .master import CoreOfficeMasterView
|
||||||
|
|
||||||
|
|
||||||
|
class CustomReceiptLineView(CoreOfficeMasterView):
|
||||||
|
"""
|
||||||
|
Master view for custom receipt text
|
||||||
|
"""
|
||||||
|
model_class = CustomReceiptLine
|
||||||
|
model_title = "CORE-POS Custom Receipt Line"
|
||||||
|
route_prefix = 'corepos.custom_receipt_lines'
|
||||||
|
url_prefix = '/core-pos/custom-receipt-lines'
|
||||||
|
|
||||||
|
|
||||||
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
CustomReceiptLineView = kwargs.get('CustomReceiptLineView', base['CustomReceiptLineView'])
|
||||||
|
CustomReceiptLineView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
Loading…
Reference in a new issue