public function newAction()
    {
        $inventory = new Inventory();

        $today = new \DateTime();;
        $inventory->setDate($today);
        $inventory->setUser($this->getUser());
        $inventory->setStatus(Inventory::STATUS_DRAFT);

        $defaultCode = $this->getInventoryService()->getNextCode();
        $inventory->setCode($defaultCode);

        $defaultName = $this->get('translator')->trans('default_name', [
            "%date%" => $today->format('d/m/y'),
        ], 'Inventory');
        $inventory->setName($defaultName);

        $form = $this->createForm(new InventoryType(), $inventory);

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