Add basic web views for "new customer order" batches

This commit is contained in:
Lance Edgar 2020-08-02 15:27:10 -05:00
parent 9a2a6bbc9f
commit 493785591c
3 changed files with 88 additions and 2 deletions

View file

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8; -*-
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2017 Lance Edgar
# Copyright © 2010-2020 Lance Edgar
#
# This file is part of Rattail.
#
@ -28,5 +28,6 @@ from __future__ import unicode_literals, absolute_import
def includeme(config):
config.include('tailbone.views.custorders.creating')
config.include('tailbone.views.custorders.orders')
config.include('tailbone.views.custorders.items')

View file

@ -0,0 +1,41 @@
# -*- coding: utf-8; -*-
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2020 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/>.
#
################################################################################
"""
Base class for customer order batch views
"""
from __future__ import unicode_literals, absolute_import
from rattail.db import model
from tailbone.views.batch import BatchMasterView
class CustomerOrderBatchView(BatchMasterView):
"""
Master view base class, for customer order batches. The views for the
various mode/workflow batches will derive from this.
"""
model_class = model.CustomerOrderBatch
model_row_class = model.CustomerOrderBatchRow
default_handler_spec = 'rattail.batch.custorder:CustomerOrderBatchHandler'

View file

@ -0,0 +1,44 @@
# -*- coding: utf-8; -*-
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2020 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/>.
#
################################################################################
"""
Views for 'creating' customer order batches
"""
from __future__ import unicode_literals, absolute_import
from tailbone.views.custorders.batch import CustomerOrderBatchView
class CreateCustomerOrderBatchView(CustomerOrderBatchView):
"""
Master view for "creating customer order" batches.
"""
route_prefix = 'new_custorders'
url_prefix = '/new-customer-orders'
model_title = "New Customer Order"
model_title_plural = "New Customer Orders"
creatable = False
def includeme(config):
CreateCustomerOrderBatchView.defaults(config)