The employee timesheet reports display PDF code in browser

Bug #637954 reported by James Jesudason
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
Dhruti Shastri(OpenERP)
Odoo Web Client
Fix Released
Undecided
Vaibhav Darji

Bug Description

Reports issue in the hr_timesheet module:
When running the Employee Timesheet reports in the web browser, the PDF code of the report is printed into the browser window. It should trigger the download or display of the PDF.

Presumably the content-type is set incorrectly when the PDF code is sent to the browser. The same reports work fine in the GTK client.

Trunk addons revno: 4920

Revision history for this message
James Jesudason (jamesj) wrote :

The problem seems to be that the Javascript action on the 'Print' button isn't launching the report in a new window, even though the wizard actions have a <field name="target">new</field> tag.

description: updated
affects: openobject-addons → openobject-client-web
Changed in openobject-client-web:
status: New → Confirmed
Changed in openobject-client-web:
assignee: nobody → vda(Open ERP) (vda-tiny)
Revision history for this message
Vaibhav Darji (vaibhav-openerp) wrote :

Hello James Jesudason,

It has been fixed at revision no:3355
<email address hidden>

Thanks.

Changed in openobject-client-web:
status: Confirmed → Fix Committed
milestone: none → 6.0
Revision history for this message
James Jesudason (jamesj) wrote :

I've just tried running the report and it now generates an error:

Traceback (most recent call last):
  File "/home/jjesudason/Documents/Development/openerp6/server/bin/service/web_services.py", line 711, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/home/jjesudason/Documents/Development/openerp6/server/bin/report/interface.py", line 88, in create
    xml = self.create_xml(cr, uid, ids, datas, context)
  File "/home/jjesudason/Documents/Development/openerp6/addons/hr_timesheet/report/user_timesheet.py", line 81, in create_xml
    rml_obj=report_sxw.rml_parse(cr, uid, rpt_obj._name,context)
AttributeError: 'NoneType' object has no attribute '_name'

Checking the line in the code indicates that the "hr.holidays" object is being retrieved, even though the hr.holiday module is not a pre-requisite for hr.timesheets. I was going to install hr.holidays, but found that it has a pre-req of crm - that seems to be a huge overkill.

The implementation I'm looking at is just for project_timesheet. I can understand that it may need hr.holiday, but hr.holiday certainly shouldn't need crm installed. Right now the report doesn't work at all.

Also, the security seems wrong. None of the Employee reports appear when the HR/Manager or HR/User groups are added to the user. The Employee report seems to require Usablity Extensions group, which doesn't make sense.

Revision history for this message
James Jesudason (jamesj) wrote :

Addons bzr revno: 4969

Problem occurs in GTK and web client.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Fortunately,
it has been fixed today itself by revision <email address hidden> before posted.
Thanks for the care taken.
P.s. : It would be really useful for other users if we keep the relevant bugs differently.The just-fixed addons one talks about different context.

Changed in openobject-addons:
status: New → Fix Released
assignee: nobody → DHS(OpenERP) (dhs-openerp)
importance: Undecided → Medium
milestone: none → 6.0
Changed in openobject-client-web:
status: Fix Committed → Fix Released
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.