Avoid deprecated product key field getter

This commit is contained in:
Lance Edgar 2023-06-27 12:37:00 -05:00
parent 8cc6def93e
commit 08a75f6e9f

View file

@ -238,8 +238,7 @@ class ProductView(MasterView):
ProductCostCodeAny.product_uuid == model.Product.uuid) ProductCostCodeAny.product_uuid == model.Product.uuid)
# product key # product key
key = self.rattail_config.product_key() field = self.get_product_key_field()
field = self.product_key_fields.get(key, key)
g.filters[field].default_active = True g.filters[field].default_active = True
g.filters[field].default_verb = 'equal' g.filters[field].default_verb = 'equal'
g.set_sort_defaults(field) g.set_sort_defaults(field)
@ -1253,8 +1252,7 @@ class ProductView(MasterView):
} }
def get_panel_fields_main(self, product): def get_panel_fields_main(self, product):
key = self.rattail_config.product_key() product_key_field = self.get_product_key_field()
product_key_field = self.product_key_fields.get(key, key)
fields = [ fields = [
product_key_field, product_key_field,
'brand', 'brand',