← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 820906] Re: addon hr_payroll no calculate slip with leaves

 

[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 C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/820906

Title:
  addon hr_payroll no calculate slip with leaves

Status in OpenERP Addons (modules):
  Expired

Bug description:
  - When I add an absence when the employee will calculate the payroll,
  the OpenERP sends the above error. The possible reason is that
  payroll_slip_line is not being linked to an account.

  - Traceback
  Traceback (most recent call last):
   File "/home/openerp/openerp-server-6.0.2/bin/netsvc.py", line 489, in dispatch
     result = ExportService.getService(service_name).dispatch(method, auth, params)
   File "/home/openerp/openerp-server-6.0.2/bin/service/web_services.py", line 599, in dispatch
     res = fn(db, uid, *params)
   File "/home/openerp/openerp-server-6.0.2/bin/osv/osv.py", line 122, in wrapper
     return f(self, dbname, *args, **kwargs)
   File "/home/openerp/openerp-server-6.0.2/bin/osv/osv.py", line 196, in exec_workflow
     res = self.exec_workflow_cr(cr, uid, obj, method, *args)
   File "/home/openerp/openerp-server-6.0.2/bin/osv/osv.py", line 189, in exec_workflow_cr
     return wf_service.trg_validate(uid, obj, args[0], method, cr)
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/wkf_service.py", line 80, in trg_validate
     res2 = instance.validate(cr, id, ident, signal)
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/instance.py", line 48, in validate
     workitem.process(cr, witem, ident, signal, force_running, stack=stack)
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/workitem.py", line 61, in process
     ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/workitem.py", line 174, in _split_test
     _join_test(cr, t[0], t[1], ident, stack)
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/workitem.py", line 182, in _join_test
     create(cr,[activity], inst_id, ident, stack)
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/workitem.py", line 41, in create
     process(cr, res, ident, stack=stack)
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/workitem.py", line 53, in process
     result = _execute(cr, workitem, activity, ident, stack)
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/workitem.py", line 107, in _execute
     wkf_expr.execute(cr, ident, workitem, activity)
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/wkf_expr.py", line 68, in execute
     return _eval_expr(cr, ident, workitem, activity['action'])
   File "/home/openerp/openerp-server-6.0.2/bin/workflow/wkf_expr.py", line 58, in _eval_expr
     ret = eval(line, env, nocopy=True)
   File "/home/openerp/openerp-server-6.0.2/bin/tools/safe_eval.py", line 284, in safe_eval
     return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
   File "", line 1, in <module>
   File "/home/openerp/openerp-server-6.0.2/bin/osv/orm.py", line 181, in <lambda>
     return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
   File "/home/openerp/openerp-server-6.0.2/bin/addons/hr_payroll_account/hr_payroll_account.py", line 575, in verify_sheet
     line_ids += [movel_pool.create(cr, uid, rec, context=context)]
   File "/home/openerp/openerp-server-6.0.2/bin/addons/account/account_move_line.py", line 1219, in create
     if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']:
   File "/home/openerp/openerp-server-6.0.2/bin/osv/orm.py", line 2940, in read
     result = self._read_flat(cr, user, select, fields, context, load)
   File "/home/openerp/openerp-server-6.0.2/bin/osv/orm.py", line 2999, in _read_flat
     cr.execute(query, (tuple(sub_ids),))
   File "/home/openerp/openerp-server-6.0.2/bin/sql_db.py", line 78, in wrapper
     return f(self, *args, **kwargs)
   File "/home/openerp/openerp-server-6.0.2/bin/sql_db.py", line 131, in execute
     res = self._obj.execute(query, params)
  ProgrammingError: operator does not exist: integer = boolean
  LINE 1: ...d FROM "account_account" WHERE account_account.id IN (false)...
                                                              ^
  HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

  
  - Possible solution
  add the link between the account and hday slip_line
  1227                 res = {                                                                                                                                                       
  1228                     'slip_id':slip.id,
  1229                     'name':hday.holiday_status_id.name + '-%s' % (hday.number_of_days),
  1230                     'code':hday.holiday_status_id.code,
  1231                     'amount_type':'fix',
  1232                     'category_id':hday.holiday_status_id.head_id.id,
  1233                     'sequence':hday.holiday_status_id.head_id.sequence,
  1234                     'account_id':hday.holiday_status_id.account_id.id, #BUG FIX
  1235                     'analytic_account_id': hday.holiday_status_id.analytic_account_id.id, #BUG FIX
  1236                 }

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


References