Add merge, delete-checked support for CORE Customers (classic)

can be useful for manual cleanup
This commit is contained in:
Lance Edgar 2023-06-18 18:52:08 -05:00
parent 8d8085437b
commit e559b3bf6b
2 changed files with 7 additions and 0 deletions

View file

@ -53,6 +53,8 @@ class CustomerClassicView(CoreOfficeMasterView):
url_prefix = '/core-pos/customers'
route_prefix = 'corepos.customers'
results_downloadable = True
set_deletable = True
mergeable = True
labels = {
'id': "ID",
@ -115,6 +117,10 @@ class CustomerClassicView(CoreOfficeMasterView):
g.set_link('first_name')
g.set_link('last_name')
def get_uuid_for_grid_row(self, customer):
# nb. uniquely identify records, for merge support
return customer.id
def configure_form(self, f):
super().configure_form(f)

View file

@ -93,6 +93,7 @@ class CustomerShopperViewSupplement(ViewSupplement):
model = self.model
g.append('corepos_customer_id')
g.set_filter('corepos_customer_id', model.CoreCustomerShopper.corepos_customer_id)
g.set_sorter('corepos_customer_id', model.CoreCustomerShopper.corepos_customer_id)
def configure_form(self, f):
if not self.master.creating: