public function executeView(sfWebRequest $request)
 {
     $this->invoice = Doctrine_Query::create()->from('Invoice i, i.Employee e, i.Terms t, i.Customer c')->where('i.id = ' . $request->getParameter('id'))->fetchOne();
     $this->form = $this->configuration->getForm($this->invoice);
     //allow set product id by url
     $detail = new Invoicedetail();
     $detail->setQty(1);
     if ($request->getParameter("product_id")) {
         $detail->setProductId($request->getParameter("product_id"));
     }
     $this->detailform = new InvoicedetailForm($detail);
     $this->detail = $detail;
 }