Add price confirm prompt when adding unknown item to custorder

optional, per config
This commit is contained in:
Lance Edgar 2023-10-24 19:51:27 -05:00
parent 4247804707
commit 72dda3771e
3 changed files with 105 additions and 2 deletions

View file

@ -375,6 +375,8 @@ class CustomerOrderView(MasterView):
'product_key_label': app.get_product_key_label(),
'allow_unknown_product': self.batch_handler.allow_unknown_product(),
'pending_product_required_fields': self.get_pending_product_required_fields(),
'unknown_product_confirm_price': self.rattail_config.getbool(
'rattail.custorders', 'unknown_product.always_confirm_price'),
'department_options': self.get_department_options(),
'default_uom_choices': self.batch_handler.uom_choices_for_product(None),
'default_uom': None,
@ -1109,6 +1111,9 @@ class CustomerOrderView(MasterView):
{'section': 'rattail.custorders',
'option': 'allow_unknown_product',
'type': bool},
{'section': 'rattail.custorders',
'option': 'unknown_product.always_confirm_price',
'type': bool},
]
for field in self.PENDING_PRODUCT_ENTRY_FIELDS: