title: Openerp 7: AttributeError: "Field 'name' does not exist in object 'browse_record(wizard_set_ages, 1)'"
body: <p>I've a wizard that needs to take some fields from the module, but when I try to execute this action comes out this error: </p>
  
  <pre><code>AttributeError: "Field 'name' does not exist in object 'browse_record(wizard_set_ages, 1)'"
  </code></pre>
  
  <p>the problem is that i don't know how to take the data form the fields. I need to iterate trough all the selected records and do that operation (takes the name an write it in the description in caps lock, like name:Atul -> set_description() -> description: ATUL)
  Here's the wizard.py code:</p>
  
  <pre><code>from osv import osv, fields
  
  class test_wizard(osv.osv_memory):
      _name='wizard_set_ages'
      _columns={}
  
      def set_all_age(self, cr, uid, ids, context=None):
          mystudents = self.pool.get('student.student')
      for student in mystudents.browse(cr, uid, ids, context=context):
          my_description = str(student.name).upper()
          mystudents.write(cr, uid, student.id, {'notes' : my_description})
  
  """edit same for set_all_age        def set_selected_age(self, cr, uid, ids, context=None):
      for prod in self.browse(cr, uid, ids, context=context):         
              my_details = str(prod.name).upper()
          self.write(cr, uid, prod.id, {'notes': my_details }) """
  </code></pre>
  
  <p>and here is the student.py file:</p>
  
  <pre><code>from osv import osv, fields
  
  
  class student_student(osv.osv):
      _name = 'student.student'
      _columns = {
                  'name' : fields.char('Student Name', size = 16, required = True, translate = True),
                  'age' : fields.integer('Age'),
                  'percentage' : fields.float('Percentage', help = 'This field will add average marks of the students out of 100'),
                  'gender' : fields.selection([('male', 'Male'), ('female', 'Female')], 'Gender'),
                  'active' : fields.boolean('Active'),
                  'notes' : fields.text('Details'),
                  }
      _defaults = {
                  'name' : 'Atul',
                  'active' : True,
                  'age' : 13,
                  }
  
      def set_age(self, cr, uid, ids, context=None):
          for prod in self.browse(cr, uid, ids, context=context):
              dict = self.read(cr, uid, ids, ['name'])            
                  my_details = str(prod.name).upper()
              self.write(cr, uid, prod.id, {'notes': my_details })
          return True
  
  student_student()
  </code></pre>
  
  <p><hr>
  EDIT: Added wizard_view.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;openerp&gt;
  &lt;data&gt;        
      &lt;!-- create a view with a unique id --&gt;
          &lt;record id="view_set_all_ages_wizard" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;wizard_set_ages_form&lt;/field&gt;
              &lt;field name="model"&gt;wizard_set_ages&lt;/field&gt;
              &lt;field name="type"&gt;form&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
              &lt;!-- create a normal form view, with the fields you've created on your python file --&gt;
                  &lt;form string="Set All Student Ages" version="7.0"&gt;
                      &lt;group &gt;
                          &lt;separator string="TEST" colspan="2"/&gt;
                          &lt;newline/&gt;
                      &lt;/group&gt;
                      &lt;div style="text-align:right"&gt;
                          &lt;button icon="gtk-cancel" special="cancel" string="Cancel"/&gt;
                          &lt;button icon="gtk-ok" name="set_all_age" string="Set All Details" type="object" /&gt;
              &lt;button icon="gtk-ok" name="set_selected_age" string="Set Only Selected Details" type="object" /&gt;
                      &lt;/div&gt;
  
                 &lt;/form&gt;
              &lt;/field&gt;
          &lt;/record&gt;
          &lt;!-- your action window refers to the view_id you've just created --&gt;
          &lt;record id="action_set_all_ages" model="ir.actions.act_window"&gt;
              &lt;field name="name"&gt;Set All Ages&lt;/field&gt;
              &lt;field name="type"&gt;ir.actions.act_window&lt;/field&gt;
              &lt;field name="res_model"&gt;wizard_set_ages&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="view_id" ref="view_set_all_ages_wizard"/&gt;
              &lt;field name="target"&gt;new&lt;/field&gt; 
          &lt;/record&gt;
  
          &lt;act_window id="action_set_all_ages"
                  name="Set All Ages"
                  res_model="wizard_set_ages" 
          src_model="student.student"
                  view_mode="form" 
                  target="new"
          key2="client_action_multi"
          /&gt;
      &lt;/data&gt;
  &lt;/openerp&gt;
  </code></pre>