title: override create method with multiple returns in OpenERP ver 7
body: <p>I need to do two activities in my activity method.
  one is need to return value for total_workers field.but need to return ID also because its necessary requirement in OpenERP when we override that method.
  then have to return 2 things.please advice me how to implement this in my form.
  with one return value this is worked for both things.but need to return both.</p>
  
  <pre><code>def create(self, cr, uid, values, context=None):
      name = 'CheckRoll No = ' + str(values['checkroll_no']) + ' &amp; Gang No = ' + str(values['gang_no'])
      values.update({'name': name})
      total_tea_workers = 0
      offer_id = super(bpl_work_offer, self).create(cr, uid, values, context=context)
      tea_worker_obj = self.browse(cr, uid, offer_id, context=context) or []
      tea_worker_ids = self.pool.get('bpl.selected.tea.workers.line').search(cr, uid, [('tea_line_worker_id', '=', tea_worker_obj.id)])
      for tea_worker in self.pool.get('bpl.selected.tea.workers.line').browse(cr, uid, tea_worker_ids):
          if tea_worker.is_selected:
              total_tea_workers += 1
      return {'value': {'total_workers': total_tea_workers}}
      return offer_id
  </code></pre>
  
  <p><strong>EDITED</strong></p>
  
  <p>I sort it out in this way.hope this will help for others
  :-)</p>
  
  <blockquote>
    <p><em><strong>i wrote a function for my field</em></strong></p>
  </blockquote>
  
  <pre><code>def _compute_workers(self, cr, uid, ids, fieldname, arg, context=None):
      total_workers = total_tea_workers = total_rubber_workers = total_sundry_workers = total_other_workers = 0
      res = dict.fromkeys(ids, False) 
      for this in self.browse(cr, uid, ids, context=context):
          tea_worker_ids = self.pool.get('bpl.selected.tea.workers.line').search(cr, uid, [('tea_line_worker_id', '=', this.id)])
          for tea_worker in self.pool.get('bpl.selected.tea.workers.line').browse(cr, uid, tea_worker_ids):
              if tea_worker.is_selected:
                  total_tea_workers += 1                
          rubber_worker_ids = self.pool.get('bpl.selected.rubber.workers.line').search(cr, uid, [('rubber_line_worker_id', '=', this.id)])
          for rubber_worker in self.pool.get('bpl.selected.rubber.workers.line').browse(cr, uid, rubber_worker_ids):
              if rubber_worker.is_selected:
                  total_rubber_workers += 1                
          sundry_worker_ids = self.pool.get('bpl.selected.sundry.workers.line').search(cr, uid, [('sundry_line_worker_id', '=', this.id)])
          for sundry_worker in self.pool.get('bpl.selected.sundry.workers.line').browse(cr, uid, sundry_worker_ids):
              if sundry_worker.is_selected:
                  total_sundry_workers += 1                
          other_worker_ids = self.pool.get('bpl.selected.other.workers.line').search(cr, uid, [('other_line_worker_id', '=', this.id)])
          for other_worker in self.pool.get('bpl.selected.other.workers.line').browse(cr, uid, other_worker_ids):
              if other_worker.is_selected:
                  total_other_workers += 1
      total_workers = total_tea_workers + total_rubber_workers + total_sundry_workers + total_other_workers                                                                             
      res[this.id] = total_workers 
      return res
  </code></pre>
  
  <blockquote>
    <p><em><strong>i changed my integer field to functional field</em></strong></p>
  </blockquote>
  
  <p>'total_workers': fields.function(_compute_workers, type="integer", string="Total Workers"),</p>