From 03dad826636c520168acfbbfcf034e50e4262aba Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 25 Nov 2021 16:50:13 -0600 Subject: [PATCH 0001/1175] Add basic support for receiving from PO with invoice --- tailbone/views/purchasing/receiving.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tailbone/views/purchasing/receiving.py b/tailbone/views/purchasing/receiving.py index ead0abed..ccc97d9a 100644 --- a/tailbone/views/purchasing/receiving.py +++ b/tailbone/views/purchasing/receiving.py @@ -457,7 +457,7 @@ class ReceivingBatchView(PurchasingBatchView): f.set_widget('store_uuid', dfwidget.HiddenWidget()) # purchase - if (self.creating and workflow == 'from_po' + if (self.creating and workflow in ('from_po', 'from_po_with_invoice') and self.purchase_order_fieldname == 'purchase'): if use_buefy: f.replace('purchase', 'purchase_uuid') @@ -507,6 +507,11 @@ class ReceivingBatchView(PurchasingBatchView): 'invoice_file', 'invoice_parser_key') + elif workflow == 'from_po_with_invoice': + f.remove('truck_dump_batch_uuid') + f.set_required('invoice_file') + f.set_required('invoice_parser_key') + elif workflow == 'truck_dump_children_first': f.remove('truck_dump_batch_uuid', 'invoice_file', @@ -561,6 +566,9 @@ class ReceivingBatchView(PurchasingBatchView): elif batch_type == 'from_po': # TODO: how to best handle this field? this doesn't seem flexible kwargs['purchase_key'] = batch.purchase_uuid + elif batch_type == 'from_po_with_invoice': + # TODO: how to best handle this field? this doesn't seem flexible + kwargs['purchase_key'] = batch.purchase_uuid elif batch_type == 'truck_dump_children_first': kwargs['truck_dump'] = True kwargs['truck_dump_children_first'] = True From b9037111a4a8370f2b7f7b472e53247b7c37899d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 25 Nov 2021 18:56:28 -0600 Subject: [PATCH 0002/1175] Don't use multi-select for new report in buefy themes also let app handler fetch the report handler --- tailbone/views/reports.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tailbone/views/reports.py b/tailbone/views/reports.py index 6f6b1660..5d1ca5eb 100644 --- a/tailbone/views/reports.py +++ b/tailbone/views/reports.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2019 Lance Edgar +# Copyright © 2010-2021 Lance Edgar # # This file is part of Rattail. # @@ -36,7 +36,6 @@ import rattail from rattail.db import model, Session as RattailSession from rattail.files import resource_path from rattail.time import localtime -from rattail.reporting import get_report_handler from rattail.threads import Thread from rattail.util import simple_error, OrderedDict @@ -286,7 +285,8 @@ class GenerateReport(View): self.handler = self.get_handler() def get_handler(self): - return get_report_handler(self.rattail_config) + app = self.get_rattail_app() + return app.get_report_handler() def choose(self): """ @@ -313,7 +313,7 @@ class GenerateReport(View): values = [(r.type_key, r.name) for r in reports.values()] values.sort(key=lambda r: r[1]) if use_buefy: - form.set_widget('report_type', forms.widgets.CustomSelectWidget(values=values, size=10)) + form.set_widget('report_type', forms.widgets.CustomSelectWidget(values=values)) form.widgets['report_type'].set_template_values(input_handler='reportTypeChanged') else: form.set_widget('report_type', forms.widgets.PlainSelectWidget(values=values, size=10)) From ce354d5bc32b07a1316942a024491a8ca3d9bf77 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 25 Nov 2021 19:01:35 -0600 Subject: [PATCH 0003/1175] Update changelog --- CHANGES.rst | 8 ++++++++ tailbone/_version.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 607d6443..7287c0cd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,14 @@ CHANGELOG ========= +0.8.176 (2021-11-25) +-------------------- + +* Add basic support for receiving from PO with invoice. + +* Don't use multi-select for new report in buefy themes. + + 0.8.175 (2021-11-17) -------------------- diff --git a/tailbone/_version.py b/tailbone/_version.py index 79b5759b..939e3843 100644 --- a/tailbone/_version.py +++ b/tailbone/_version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8; -*- -__version__ = '0.8.175' +__version__ = '0.8.176' From c1f91906134c91f9c1ae439220be369f94e017f2 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 27 Nov 2021 19:08:15 -0600 Subject: [PATCH 0004/1175] Show current/sale pricing for products in new custorder page --- tailbone/templates/custorders/create.mako | 69 ++++++++++++++++++++--- 1 file changed, 61 insertions(+), 8 deletions(-) diff --git a/tailbone/templates/custorders/create.mako b/tailbone/templates/custorders/create.mako index cfbc4894..98dafda4 100644 --- a/tailbone/templates/custorders/create.mako +++ b/tailbone/templates/custorders/create.mako @@ -552,6 +552,10 @@ {{ productSize }} + + {{ productCaseQuantity }} + + 2021-01-01 --> - - {{ productCaseQuantity }} + + + {{ productSalePriceDisplay }} + + + + + + {{ productSaleEndsDisplay }} + @@ -622,6 +636,20 @@ + + + {{ productSalePriceDisplay }} + + + + + + {{ productSaleEndsDisplay }} + + + {{ productCaseQuantity }} @@ -629,7 +657,9 @@ {{ productCasePriceDisplay }} @@ -702,11 +732,6 @@ field="description" sortable> {{ props.row.description }} - - - {{ props.row.size }} @@ -716,6 +741,22 @@ {{ props.row.unit_price_display }} + + + {{ props.row.sale_price_display }} + + + + + + {{ props.row.sale_ends_display }} + + + @@ -933,6 +974,8 @@ productCaseQuantity: null, productUnitPriceDisplay: null, productCasePriceDisplay: null, + productSalePriceDisplay: null, + productSaleEndsDisplay: null, productURL: null, productImageURL: null, productQuantity: null, @@ -1486,6 +1529,8 @@ this.productCaseQuantity = null this.productUnitPriceDisplay = null this.productCasePriceDisplay = null + this.productSalePriceDisplay = null + this.productSaleEndsDisplay = null this.productImageURL = '${request.static_url('tailbone:static/img/product.png')}' this.productQuantity = 1 this.productUnitChoices = this.defaultUnitChoices @@ -1533,6 +1578,8 @@ this.productCaseQuantity = selected.case_quantity this.productUnitPriceDisplay = selected.unit_price_display this.productCasePriceDisplay = selected.case_price_display + this.productSalePriceDisplay = selected.sale_price_display + this.productSaleEndsDisplay = selected.sale_ends_display this.productImageURL = selected.image_url this.productURL = selected.url this.productQuantity = 1 @@ -1561,6 +1608,8 @@ this.productURL = row.product_url this.productUnitPriceDisplay = row.unit_price_display this.productCasePriceDisplay = row.case_price_display + this.productSalePriceDisplay = row.sale_price_display + this.productSaleEndsDisplay = row.sale_ends_display this.productImageURL = row.product_image_url this.productQuantity = row.order_quantity this.productUnitChoices = row.order_uom_choices @@ -1606,6 +1655,8 @@ this.productCaseQuantity = null this.productUnitPriceDisplay = null this.productCasePriceDisplay = null + this.productSalePriceDisplay = null + this.productSaleEndsDisplay = null this.productURL = null this.productImageURL = null this.productUnitChoices = this.defaultUnitChoices @@ -1651,6 +1702,8 @@ this.productCaseQuantity = response.data.case_quantity this.productUnitPriceDisplay = response.data.unit_price_display this.productCasePriceDisplay = response.data.case_price_display + this.productSalePriceDisplay = response.data.sale_price_display + this.productSaleEndsDisplay = response.data.sale_ends_display this.productURL = response.data.url this.productImageURL = response.data.image_url this.setProductUnitChoices(response.data.uom_choices) From dbd00291b33a393a3cc3aa711264240b93174fcd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 27 Nov 2021 19:47:02 -0600 Subject: [PATCH 0005/1175] Add simple search filters for past items dialog in new custorder --- tailbone/templates/custorders/create.mako | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tailbone/templates/custorders/create.mako b/tailbone/templates/custorders/create.mako index 98dafda4..0071b61f 100644 --- a/tailbone/templates/custorders/create.mako +++ b/tailbone/templates/custorders/create.mako @@ -713,7 +713,8 @@ :selected.sync="pastItemsSelected" sortable paginated - per-page="6"> + per-page="5" + :debounce-search="1000">