Employee Timesheet report givs an error on openerp 7.0 and trunk

Bug #1217995 reported by Juan José Scarafía (ADHOC)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP R&D Addons Team 3

Bug Description

OPENERP TRUNK
Using openerp TRUNK (Version 8.0alpha1) under ubuntu 13.04

Install a new database with demo data. Install module 'hr_timesheet_sheet'
Go to "report/human resources/reports/employee timesheet" --> Print
TRACEBACK
2013-08-28 17:00:32,862 25464 ERROR error_timesheet_en_trunk openerp.addons.web.http: An exception occured during an http request
Traceback (most recent call last):
  File "/opt/oerpenv/chosco/test80/default/local/lib/python2.7/site-packages/openerp/addons/web/http.py", line 414, in dispatch
    r = self._call_function(**self.params)
  File "/opt/oerpenv/chosco/test80/default/local/lib/python2.7/site-packages/openerp/addons/web/http.py", line 174, in _call_function
    return self.func(*args, **kwargs)
  File "/opt/oerpenv/chosco/test80/default/local/lib/python2.7/site-packages/openerp/addons/web/http.py", line 1053, in nfunc
    return func(*args, **kwargs)
  File "/opt/oerpenv/chosco/test80/default/local/lib/python2.7/site-packages/openerp/addons/web/controllers/main.py", line 1687, in index
    raise ValueError("action['datas']['ids'] and context['active_ids'] are undefined")
ValueError: action['datas']['ids'] and context['active_ids'] are undefined

note: it also gives error on employees timesheet report

OPENERP 7.0
Using openerp 7.0 (updated 28/08/2013) under ubuntu 13.04
Install a new database with demo data. Install module 'hr_timesheet_sheet'
Go to "report/human resources/employee timesheet" --> Print
TRACEBACK
2013-08-28 17:03:33,459 13977 INFO error_timesheet_en_70 werkzeug: 127.0.0.1 - - [28/Aug/2013 17:03:33] "POST /web/dataset/call_button HTTP/1.1" 200 -
2013-08-28 17:03:33,589 13977 ERROR error_timesheet_en_70 openerp.service.web_services: Exception: local variable 'context' referenced before assignment
Traceback (most recent call last):
  File "/opt/oerpenv/chosco/test70/default/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/service/web_services.py", line 712, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/opt/oerpenv/chosco/test70/default/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/report/interface.py", line 88, in create
    rml = self.create_rml(cr, xml, uid, context)
  File "/opt/oerpenv/chosco/test70/default/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/report/interface.py", line 192, in create_rml
    transform(etree.fromstring(xml)))
  File "xslt.pxi", line 538, in lxml.etree.XSLT.__call__ (src/lxml/lxml.etree.c:130543)
UnboundLocalError: local variable 'context' referenced before assignment
2013-08-28 17:03:33,785 13977 ERROR error_timesheet_en_70 openerp.netsvc: local variable 'context' referenced before assignment
(<type 'exceptions.UnboundLocalError'>, UnboundLocalError("local variable 'context' referenced before assignment",), <traceback object at 0x7fc5f0366560>)
Traceback (most recent call last):
  File "/opt/oerpenv/chosco/test70/default/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/oerpenv/chosco/test70/default/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/service/web_services.py", line 654, in dispatch
    res = fn(db, uid, *params)
  File "/opt/oerpenv/chosco/test70/default/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/service/web_services.py", line 760, in exp_report_get
    return self._check_report(report_id)
  File "/opt/oerpenv/chosco/test70/default/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/service/web_services.py", line 738, in _check_report
    netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
  File "/opt/oerpenv/chosco/test70/default/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/netsvc.py", line 71, in abort_response
    raise openerp.osv.osv.except_osv(description, details)
except_osv: (u"local variable 'context' referenced before assignment", (<type 'exceptions.UnboundLocalError'>, UnboundLocalError("local variable 'context' referenced before assignment",), <traceback object at 0x7fc5f0366560>))
> /opt/oerpenv/chosco/test70/default/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/netsvc.py(71)abort_response()
-> raise openerp.osv.osv.except_osv(description, details)
(Pdb)

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Hello i test your actions and confirm the bug.

Regards,

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
status: New → Confirmed
Changed in openobject-addons:
importance: Undecided → Low
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Cristian,

I do not face it. I wish to know the server trace where it will show something like this:

File "/home/BarackObama/workspace/7.0/addons/hr_timesheet/report/user_timesheet.py", line 48, in create_xml
    if context is None:
UnboundLocalError: local variable 'context' referenced before assignment
2013-08-31 07:57:59,093 15216 ERROR None openerp.netsvc: local variable 'context' referenced before assignment
(<type 'exceptions.UnboundLocalError'>, UnboundLocalError("local variable 'context' referenced before assignment",), <traceback object at 0xb39357d4>)

Make sure your lxml is compatible too.

Thanks.

tags: added: hr sheet timesheet
removed: 7.0 trunk
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.