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:
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue