diff --git a/rattail/batch/custorder.py b/rattail/batch/custorder.py index e4a7aeae6beb67796650419735b3b4292f960f9d..ffa82b4545a289910296f055295710c700e47f36 100644 --- a/rattail/batch/custorder.py +++ b/rattail/batch/custorder.py @@ -72,6 +72,17 @@ class CustomerOrderBatchHandler(BatchHandler): 'new_order_requires_customer', default=False) + def allow_contact_info_choice(self): + """ + Returns a boolean indicating whether the user is allowed at + all, to choose from existing contact info options for the + customer, vs. they just have to go with whatever the handler + auto-provides. + """ + return self.config.getbool('rattail.custorders', + 'new_orders.allow_contact_info_choice', + default=True) + def should_restrict_contact_info(self): """ Returns a boolean indicating whether contact info should be diff --git a/rattail/settings.py b/rattail/settings.py index 51f998c74551799d4bcc6a8619fb4633f10d3c81..7456c8a34fe987ba6ca2358d856f4504de1a49c5 100644 --- a/rattail/settings.py +++ b/rattail/settings.py @@ -127,6 +127,17 @@ class rattail_custorders_new_order_requires_customer(Setting): name = 'new_order_requires_customer' data_type = bool +class rattail_custorders_new_orders_allow_contact_info_choice(Setting): + """ + If set, then user can choose from contact info options, when + creating new order. If *not* set then they cannot choose, and + must use whatever the batch handler provides. + """ + group = "Customer Orders" + namespace = 'rattail.custorders' + name = 'new_orders.allow_contact_info_choice' + data_type = bool + class rattail_custorders_new_orders_restrict_contact_info(Setting): """ If set, then user can only choose from existing contact info options,