Add versioning display support for contact-related models

This commit is contained in:
Lance Edgar 2017-07-05 17:16:28 -05:00
parent 20ddf2687b
commit 85bdefc25b
8 changed files with 125 additions and 27 deletions

View file

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8; -*-
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2015 Lance Edgar
# Copyright © 2010-2017 Lance Edgar
#
# This file is part of Rattail.
#
@ -39,6 +39,7 @@ class VendorsView(MasterView):
Master view for the Vendor class.
"""
model_class = model.Vendor
has_versions = True
def configure_grid(self, g):
g.filters['name'].default_active = True
@ -78,6 +79,13 @@ class VendorsView(MasterView):
for cost in q:
Session.delete(cost)
def get_version_child_classes(self):
return [
(model.VendorPhoneNumber, 'parent_uuid'),
(model.VendorEmailAddress, 'parent_uuid'),
(model.VendorContact, 'vendor_uuid'),
]
class VendorVersionView(VersionView):
"""