← Back to team overview

openerp-india team mailing list archive

[Bug 1045625] Re: method parameter position problem on hr_timesheet_sheet

 

[Expired for OpenERP Addons because there has been no activity for 60
days.]

** Changed in: openobject-addons
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1045625

Title:
  method parameter position problem on hr_timesheet_sheet

Status in OpenERP Addons (modules):
  Expired

Bug description:
  Please look at addons/ht_timesheet_sheet/hr_timesheet_sheet.py line
  421

  def _sheet_date(self, cr, uid, ids, forced_user_id=False, context=None):
      ...

  
  I think parameters has wrong declared.

  Traceback (most recent call last):
    File "/home/openerp/openerp/osv/osv.py", line 121, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/openerp/openerp/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/openerp/openerp/addons/audittrail/audittrail.py", line 495, in execute_cr
      return fct_src(cr, uid, model, method, *args)
    File "/home/openerp/openerp/osv/osv.py", line 164, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/openerp/openerp/addons/hr_timesheet_sheet/hr_timesheet_sheet.py", line 251, in create
      return super(hr_timesheet_sheet, self).create(cr, uid, vals, *args, **argv)
    File "/home/openerp/openerp/osv/orm.py", line 4247, in create
      self._validate(cr, user, [id_new], context)
    File "/home/openerp/openerp/osv/orm.py", line 1448, in _validate
      if not fun(self, cr, uid, ids, context):
    File "/home/openerp/openerp/addons/hr_timesheet_sheet/hr_timesheet_sheet.py", line 421, in _sheet_date
      AND id <> %s',(sheet.date_to, sheet.date_from, new_user_id, sheet.id))
    File "/home/openerp/openerp/sql_db.py", line 152, in wrapper
      return f(self, *args, **kwargs)
    File "/home/openerp/openerp/sql_db.py", line 212, in execute
      res = self._obj.execute(query, params)
  ProgrammingError: can't adapt type 'dict'

  
  When this method called from orm.py  pushing value of forced_user_id is context dictionary.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1045625/+subscriptions


References