Add versioning display support for contact-related models
This commit is contained in:
parent
20ddf2687b
commit
85bdefc25b
8 changed files with 125 additions and 27 deletions
12
tailbone/views/vendors/core.py
vendored
12
tailbone/views/vendors/core.py
vendored
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue