Add "touch" support for Members
This commit is contained in:
parent
6f02e1b18e
commit
9b59b44609
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -24,9 +24,6 @@
|
|||
Member Views
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import six
|
||||
import sqlalchemy as sa
|
||||
|
||||
from rattail.db import model
|
||||
|
@ -43,6 +40,7 @@ class MemberView(MasterView):
|
|||
"""
|
||||
model_class = model.Member
|
||||
is_contact = True
|
||||
touchable = True
|
||||
has_versions = True
|
||||
|
||||
labels = {
|
||||
|
@ -134,7 +132,7 @@ class MemberView(MasterView):
|
|||
f.replace('person', 'person_uuid')
|
||||
people = self.Session.query(model.Person)\
|
||||
.order_by(model.Person.display_name)
|
||||
values = [(p.uuid, six.text_type(p))
|
||||
values = [(p.uuid, str(p))
|
||||
for p in people]
|
||||
require = False
|
||||
if not require:
|
||||
|
@ -151,7 +149,7 @@ class MemberView(MasterView):
|
|||
f.replace('customer', 'customer_uuid')
|
||||
customers = self.Session.query(model.Customer)\
|
||||
.order_by(model.Customer.name)
|
||||
values = [(c.uuid, six.text_type(c))
|
||||
values = [(c.uuid, str(c))
|
||||
for c in customers]
|
||||
require = False
|
||||
if not require:
|
||||
|
|
Loading…
Reference in a new issue