diff --git a/rattail/batch/custorder.py b/rattail/batch/custorder.py index 861e0fb365ecb1393f2b9af0fe82651f470e0366..0f059eeb658bc3489186ae4860cba4c9a6e02c4b 100644 --- a/rattail/batch/custorder.py +++ b/rattail/batch/custorder.py @@ -458,6 +458,17 @@ class CustomerOrderBatchHandler(BatchHandler): "{}.custom_product_autocomplete() " "method.".format(__class__.__name__)) + def why_not_add_product(self, product, batch): + """ + This method can inspect the given product, and batch, to + determine if the product may be added to the batch as a new + row. Useful to e.g. prevent one customer from ordering too + many things, etc. + + :returns: If there is a reason not to add the product, should + return that reason as a string; otherwise ``None``. + """ + def refresh_row(self, row): if not row.product: if row.item_entry: