Remove several references to "buefy" name
class methods, template filenames, etc. also made various edits per newer conventions
This commit is contained in:
parent
96ba039299
commit
c036932ce4
50 changed files with 373 additions and 361 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
# Copyright © 2010-2024 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -28,10 +28,9 @@ from rattail.db.model import PurchaseBatch, PurchaseBatchRow
|
|||
|
||||
import colander
|
||||
from deform import widget as dfwidget
|
||||
from pyramid import httpexceptions
|
||||
from webhelpers2.html import tags, HTML
|
||||
|
||||
from tailbone import forms, grids
|
||||
from tailbone import forms
|
||||
from tailbone.views.batch import BatchMasterView
|
||||
|
||||
|
||||
|
@ -826,7 +825,7 @@ class PurchasingBatchView(BatchMasterView):
|
|||
def render_row_credits(self, row, field):
|
||||
g = self.make_row_credits_grid(row)
|
||||
return HTML.literal(
|
||||
g.render_buefy_table_element(data_prop='rowData.credits'))
|
||||
g.render_table_element(data_prop='rowData.credits'))
|
||||
|
||||
# def before_create_row(self, form):
|
||||
# row = form.fieldset.model
|
||||
|
|
|
@ -310,8 +310,6 @@ class OrderingBatchView(PurchasingBatchView):
|
|||
if not order_date:
|
||||
order_date = localtime(self.rattail_config).date()
|
||||
|
||||
buefy_data = self.get_worksheet_buefy_data(departments)
|
||||
|
||||
return self.render_to_response('worksheet', {
|
||||
'batch': batch,
|
||||
'order_date': order_date,
|
||||
|
@ -324,10 +322,10 @@ class OrderingBatchView(PurchasingBatchView):
|
|||
'get_upc': lambda p: p.upc.pretty() if p.upc else '',
|
||||
'header_columns': self.order_form_header_columns,
|
||||
'ignore_cases': not self.handler.allow_cases(),
|
||||
'worksheet_data': buefy_data,
|
||||
'worksheet_data': self.get_worksheet_data(departments),
|
||||
})
|
||||
|
||||
def get_worksheet_buefy_data(self, departments):
|
||||
def get_worksheet_data(self, departments):
|
||||
data = {}
|
||||
for department in departments.values():
|
||||
for subdepartment in department._order_subdepartments.values():
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
# Copyright © 2010-2024 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -33,12 +33,10 @@ from collections import OrderedDict
|
|||
import humanize
|
||||
|
||||
from rattail import pod
|
||||
from rattail.time import localtime, make_utc
|
||||
from rattail.util import pretty_quantity, prettify, simple_error
|
||||
from rattail.util import prettify, simple_error
|
||||
|
||||
import colander
|
||||
from deform import widget as dfwidget
|
||||
from pyramid import httpexceptions
|
||||
from webhelpers2.html import tags, HTML
|
||||
|
||||
from tailbone import forms, grids
|
||||
|
@ -781,8 +779,8 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
g.set_click_handler('title', "autoFilterPoVsInvoice(props.row)")
|
||||
kwargs['po_vs_invoice_breakdown_data'] = breakdown
|
||||
kwargs['po_vs_invoice_breakdown_grid'] = HTML.literal(
|
||||
g.render_buefy_table_element(data_prop='poVsInvoiceBreakdownData',
|
||||
empty_labels=True))
|
||||
g.render_table_element(data_prop='poVsInvoiceBreakdownData',
|
||||
empty_labels=True))
|
||||
|
||||
kwargs['allow_edit_catalog_unit_cost'] = self.allow_edit_catalog_unit_cost(batch)
|
||||
kwargs['allow_edit_invoice_unit_cost'] = self.allow_edit_invoice_unit_cost(batch)
|
||||
|
@ -1137,6 +1135,7 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
"""
|
||||
Primary desktop view for row-level receiving.
|
||||
"""
|
||||
app = self.get_rattail_app()
|
||||
# TODO: this code was largely copied from mobile_receive_row() but it
|
||||
# tries to pave the way for shared logic, i.e. where the latter would
|
||||
# simply invoke this method and return the result. however we're not
|
||||
|
@ -1270,7 +1269,7 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
if accounted_for:
|
||||
# some product accounted for; button should receive "remainder" only
|
||||
if remainder:
|
||||
remainder = pretty_quantity(remainder)
|
||||
remainder = app.render_quantity(remainder)
|
||||
context['quick_receive_quantity'] = remainder
|
||||
context['quick_receive_text'] = "Receive Remainder ({} {})".format(remainder, context['unit_uom'])
|
||||
else:
|
||||
|
@ -1280,7 +1279,7 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
else: # nothing yet accounted for, button should receive "all"
|
||||
if not remainder:
|
||||
raise ValueError("why is remainder empty?")
|
||||
remainder = pretty_quantity(remainder)
|
||||
remainder = app.render_quantity(remainder)
|
||||
context['quick_receive_quantity'] = remainder
|
||||
context['quick_receive_text'] = "Receive ALL ({} {})".format(remainder, context['unit_uom'])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue