title: Cron function missing argument
body: <p>I'm trying to make a cron function to change status of student but it gives me an error that my function take 5 arguments and only 4 given.</p>
  
  <p>Here is my class which containing the function <code>def get_age_comp:</code> </p>
  
  <pre><code>from openerp.osv import osv, fields
  from datetime import date
  from dateutil.relativedelta import relativedelta
  
  
  class fci_student(osv.osv):
      _name = 'fci.student'
      _columns = {
          'photo': fields.binary(string='Photo'),
          'name': fields.char(size=128, string='First Name', required=True),
          'middle_name': fields.char(size=128, string='Middle Name', required=True),
          'last_name': fields.char(size=128, string='Last Name', required=True),
          'status': fields.selection([('under_Age', 'Under Age'), ('get_card', 'Get Card'), ('got_card', 'Got Card')],
                                     string='Military Status'
                                     , default='under_Age'),
          # basic details
          'user_id': fields.many2one('res.users', 'User'),
          "birth_date": fields.date(string='Birth Date', required=True),
          'gender': fields.selection([('m', 'Male'), ('f', 'Female'), ('o', 'Other')], string='Gender', required=True),
          'title': fields.selection([('mr', 'Mr.'), ('ms', 'Mrs.')], string='Title'),
          'Paid': fields.boolean('Paid Student'),
          'nationality': fields.many2one('res.country', string='Nationality'),
          'id_number': fields.char(size=64, string='ID Card Number', required=True),
          'phone': fields.char(string='Phone Number', size=256, required=True),
          'email_address': fields.char(string='E-mail', size=256, required=True),
          'pay_amount': fields.char(size=64, string='Payment', required=True),
          # Edictional details
          'standard_id': fields.many2one('fci.standard', string='Standard', required=True),
          'group_id': fields.many2one('fci.standard.groups',string='Groups(s)'),
  
          'terms_id': fields.many2one('fci.terms', string='Term'),
          'sit_number': fields.integer(size=128, string='Sit Number',required=True),
          'subject_id':fields.many2many('fci.subject','student_sub_rel','sub_student_rel','sub_stu_id','Subjects'),
          # Parent details
          'parent_name': fields.char(size=128, string='Parent First Name'),
          'parent_middle_name': fields.char(size=128, string='Parent First Name'),
          'parent_last_name': fields.char(size=128, string='Parent First Name'),
          'parent_phone': fields.integer(size=128, string='Parent Number'),
          'parent_ids': fields.char(size=128, string='Parent E-mail'),
          # Library details
          'library_card_number': fields.char(size=64, string='Library Card Number'),
          'library_card_type': fields.char(size=64, string='Library Card type'),
          'number_of_books_allow': fields.char(size=64, string='Number of books allow'),
          # Address details
          'street_name': fields.char(size=128, string='Street', required=True),
          'city_name': fields.char(size=128, string='City', required=True),
          'state_name': fields.char(size=128, string='State', required=True),
          'Zip': fields.char(size=128, string='Zip Code'),
          'country': fields.char(size=128, string='country', required=True),
          #Exams
          'exam_res': fields.char(size=128, string='Results'),
          'grade': fields.char(size=128, string='Results'),
          'percentage': fields.char(size=128, string='Results'),
  
      }
  
      #the Cron function
      def get_age_comp(self, cr, uid,ids ,context={}):
          student_ids=self.search(cr, uid,[('gender', '=like', 'm'), ('status', '=like', 'under_Age'),
                                           ('birth_date', '&lt;', date.today() - relativedelta(years=20))])
          if student_ids:
              self.write(cr, uid, student_ids, {'status': 'get_card'}, context=context)
          return True
  </code></pre>
  
  <p>Here is my xml to call it : </p>
  
  <pre><code>&lt;record id="ir_cron_actions" model="ir.cron"&gt;
      &lt;field name="name"&gt;compare&lt;/field&gt;
      &lt;field eval="True" name="active"/&gt;
      &lt;field name="user_id" ref="base.user_root"/&gt;
      &lt;field name="interval_number"&gt;1&lt;/field&gt;
      &lt;field name="interval_type"&gt;minutes&lt;/field&gt;
      &lt;field name="numbercall"&gt;-1&lt;/field&gt;
      &lt;field eval="'fci.student'" name="model"/&gt;
      &lt;field eval="'get_age_comp'" name="function"/&gt;
      &lt;field eval="'()'" name="args"/&gt;
  &lt;/record&gt;
  </code></pre>