Fix product URL for a new custorder scenario

This commit is contained in:
Lance Edgar 2021-11-06 20:31:55 -05:00
parent 5d875bc731
commit 3990854d42
2 changed files with 7 additions and 3 deletions

View file

@ -183,13 +183,17 @@ class CustomerOrderView(MasterView):
def configure_row_grid(self, g):
super(CustomerOrderView, self).configure_row_grid(g)
app = self.get_rattail_app()
handler = app.get_batch_handler(
'custorder',
default='rattail.batch.custorder:CustomerOrderBatchHandler')
g.set_type('case_quantity', 'quantity')
g.set_type('order_quantity', 'quantity')
g.set_type('cases_ordered', 'quantity')
g.set_type('units_ordered', 'quantity')
if self.handler.product_price_may_be_questionable():
if handler.product_price_may_be_questionable():
g.set_renderer('total_price', self.render_price_with_confirmation)
else:
g.set_type('total_price', 'currency')