diff --git a/tailbone/views/custorders/orders.py b/tailbone/views/custorders/orders.py index b7b583dc..0b72f377 100644 --- a/tailbone/views/custorders/orders.py +++ b/tailbone/views/custorders/orders.py @@ -682,14 +682,10 @@ class CustomerOrderView(MasterView): if not product: return {'error': "Product not found"} - row = self.handler.make_row() - row.item_entry = product.uuid - row.product = product - row.order_quantity = decimal.Decimal(data.get('order_quantity') or '0') - row.order_uom = data.get('order_uom') - self.handler.add_row(batch, row) + row = self.handler.add_product(batch, product, + decimal.Decimal(data.get('order_quantity') or '0'), + data.get('order_uom')) self.Session.flush() - self.Session.refresh(row) else: # product is not known raise NotImplementedError # TODO