Add merge, delete-checked support for CORE Customers (classic)
can be useful for manual cleanup
This commit is contained in:
parent
8d8085437b
commit
e559b3bf6b
|
@ -53,6 +53,8 @@ class CustomerClassicView(CoreOfficeMasterView):
|
||||||
url_prefix = '/core-pos/customers'
|
url_prefix = '/core-pos/customers'
|
||||||
route_prefix = 'corepos.customers'
|
route_prefix = 'corepos.customers'
|
||||||
results_downloadable = True
|
results_downloadable = True
|
||||||
|
set_deletable = True
|
||||||
|
mergeable = True
|
||||||
|
|
||||||
labels = {
|
labels = {
|
||||||
'id': "ID",
|
'id': "ID",
|
||||||
|
@ -115,6 +117,10 @@ class CustomerClassicView(CoreOfficeMasterView):
|
||||||
g.set_link('first_name')
|
g.set_link('first_name')
|
||||||
g.set_link('last_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):
|
def configure_form(self, f):
|
||||||
super().configure_form(f)
|
super().configure_form(f)
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,7 @@ class CustomerShopperViewSupplement(ViewSupplement):
|
||||||
model = self.model
|
model = self.model
|
||||||
g.append('corepos_customer_id')
|
g.append('corepos_customer_id')
|
||||||
g.set_filter('corepos_customer_id', model.CoreCustomerShopper.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):
|
def configure_form(self, f):
|
||||||
if not self.master.creating:
|
if not self.master.creating:
|
||||||
|
|
Loading…
Reference in a new issue