public function createAction(Request $request)
    {
        $inventory = new Inventory();
        $inventory->setStatus(Inventory::STATUS_DRAFT);
        $form = $this->createForm(new InventoryType(), $inventory);
        if ($form->handleRequest($request)->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $this->get('flower.stock.service.inventory')->fillInventory($inventory);
            $em->persist($inventory);
            $em->flush();


            return $this->redirect($this->generateUrl('stock_inventory_show', array('id' => $inventory->getId())));
        }

        return array(
            'inventory' => $inventory,
            'form' => $form->createView(),
        );
    }