Invoke handler when adding new item to custorder batch
This commit is contained in:
parent
87374d5647
commit
93b752f436
|
@ -682,14 +682,10 @@ class CustomerOrderView(MasterView):
|
||||||
if not product:
|
if not product:
|
||||||
return {'error': "Product not found"}
|
return {'error': "Product not found"}
|
||||||
|
|
||||||
row = self.handler.make_row()
|
row = self.handler.add_product(batch, product,
|
||||||
row.item_entry = product.uuid
|
decimal.Decimal(data.get('order_quantity') or '0'),
|
||||||
row.product = product
|
data.get('order_uom'))
|
||||||
row.order_quantity = decimal.Decimal(data.get('order_quantity') or '0')
|
|
||||||
row.order_uom = data.get('order_uom')
|
|
||||||
self.handler.add_row(batch, row)
|
|
||||||
self.Session.flush()
|
self.Session.flush()
|
||||||
self.Session.refresh(row)
|
|
||||||
|
|
||||||
else: # product is not known
|
else: # product is not known
|
||||||
raise NotImplementedError # TODO
|
raise NotImplementedError # TODO
|
||||||
|
|
Loading…
Reference in a new issue