title: How to remove the server error on loading of new form in openerp?
body: <p>I have been working on creating a custom module in my openerp server v7. As I am using win 7 , I am running the python code on my eclipse IDE . I have creted a button on my module and it will load a new form on click . Now when I click the button , the new form is loading but I am getting " openerp server error " . Also the fields I defined are not there on my new form . I dont know where I am getting wrong . Plz help.</p>
  
  <p>Hopes for suggestion</p>
  
  <p>here is my python code</p>
  
  <pre><code>from osv import fields, osv
  import time
  
  class my_module(osv.osv):
      _name="my.module"
      _columns={
           'name':fields.char('Name',size=64),
           'proj':fields.char('Proj-Details',size=64)     
              }
  
      def add_field(self,cr,uid,ids,context=None):
             return {
           'name':'formview', 
           'view_mode': 'form',
           'view_type': 'form',
           'res_id' : 'form_view_action2', # id of the object to which to redirected
           'res_model': 'ir.actions.act_window', # object name
           'type': 'ir.actions.act_window',
           'target': 'new' # if you want to open the form in new tab
          }   
  
  
  
  
  class new_module(osv.osv):
      _name="new.module"
      _columns={
            'date':fields.date('date')    
                }
  </code></pre>
  
  <p>here is my xml code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;openerp&gt;
      &lt;data&gt;
  
  
         &lt;record model="ir.ui.view" id="from_view_form"&gt;
              &lt;field name="name"&gt;from.view.form&lt;/field&gt;
              &lt;field name="model"&gt;my.module&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;form string="Form" version="7.0"&gt;
                      &lt;group&gt;
                          &lt;field name="name" /&gt;
                          &lt;field name="proj" /&gt;
                          &lt;button name="add_field" string="Add Field" type="object"  class="oe_highlight" /&gt;
                      &lt;/group&gt;
                  &lt;/form&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
  
          &lt;record model='ir.actions.act_window' id='form_view_action2'&gt;
              &lt;field name="name"&gt;Form&lt;/field&gt;
              &lt;field name="res_model"&gt;new.module&lt;/field&gt;
              &lt;field name="view_type"&gt;form&lt;/field&gt;
              &lt;field name="view_mode"&gt;form&lt;/field&gt;
              &lt;field name="context"&gt;{}&lt;/field&gt;
              &lt;field name="help" type="html"&gt;
                  &lt;p class="oe_view_nocontent_create"&gt;
                      Click to create a new record.
                  &lt;/p&gt;
                  &lt;p&gt;This is a test class developed to learn Openerp.&lt;/p&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
  
         &lt;record model='ir.actions.act_window' id='form_view_action'&gt;
              &lt;field name="name"&gt;Form&lt;/field&gt;
              &lt;field name="res_model"&gt;my.module&lt;/field&gt;
              &lt;field name="view_type"&gt;form&lt;/field&gt;
              &lt;field name="view_mode"&gt;tree,form&lt;/field&gt;
              &lt;field name="context"&gt;{}&lt;/field&gt;
              &lt;field name="help" type="html"&gt;
                  &lt;p class="oe_view_nocontent_create"&gt;
                      Click to create a new record.
                  &lt;/p&gt;
                  &lt;p&gt;This is a test class developed to learn Openerp.&lt;/p&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
  
  
  
  
          &lt;menuitem name="newforms" id="newforms_ID" sequence="110" /&gt;
          &lt;menuitem name="newforms2" parent="newforms_ID" id="newforms2_ID" sequence="0" /&gt;
          &lt;menuitem name="newforms3" parent="newforms2_ID" id="newforms3_ID" action='form_view_action' /&gt;
          &lt;menuitem name="newforms4" id="newforms4_ID" action='form_view_action2' /&gt;
  
  
  
      &lt;/data&gt;
  &lt;/openerp&gt;
  </code></pre>