openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #05059
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-hr_evaluation-amp into lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind
Amit Parik (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-hr_evaluation-amp into lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-hr_evaluation-amp/+merge/56337
Hello,
Fix : Fixes the syntax error on filter in hr_evaluation
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-hr_evaluation-amp/+merge/56337
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/trunk-bug-hr_evaluation-amp into lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind.
=== modified file 'hr_evaluation/hr_evaluation_view.xml'
--- hr_evaluation/hr_evaluation_view.xml 2011-03-09 13:03:45 +0000
+++ hr_evaluation/hr_evaluation_view.xml 2011-04-05 12:03:30 +0000
@@ -252,7 +252,7 @@
<field name="arch" type="xml">
<search string="Search Evaluation">
<group col='10' colspan='4'>
- <filter icon="terp-check" string="Current" domain="[('state','=','wait'))]" help="Evaluations that are in waiting state"/>
+ <filter icon="terp-check" string="Current" domain="[('state','=','wait')]" help="Evaluations that are in waiting state"/>
<filter icon="terp-camera_test" string="In progress" domain="[('state','=','progress')]" help="Evaluations that are in progress state"/>
<separator orientation="vertical"/>
<filter icon="terp-go-week" string="7 Days" help="Evaluations to close within the next 7 days"
=== modified file 'report_webkit/webkit_report.py'
--- report_webkit/webkit_report.py 2011-01-19 14:50:32 +0000
+++ report_webkit/webkit_report.py 2011-04-05 12:03:30 +0000
@@ -29,7 +29,7 @@
#
##############################################################################
-import commands
+import subprocess
import os
import report
import tempfile
@@ -109,7 +109,7 @@
head_file.write(header)
head_file.close()
file_to_del.append(head_file.name)
- command.append("--header-html '%s'"%(head_file.name))
+ command.extend(['--header-html', head_file.name])
if footer :
foot_file = file( os.path.join(
tmp_dir,
@@ -120,20 +120,20 @@
foot_file.write(footer)
foot_file.close()
file_to_del.append(foot_file.name)
- command.append("--footer-html '%s'"%(foot_file.name))
+ command.extend(['--footer-html', foot_file.name])
if webkit_header.margin_top :
- command.append('--margin-top %s'%(str(webkit_header.margin_top).replace(',', '.')))
+ command.extend(['--margin-top', str(webkit_header.margin_top).replace(',', '.')])
if webkit_header.margin_bottom :
- command.append('--margin-bottom %s'%(str(webkit_header.margin_bottom).replace(',', '.')))
+ command.extend(['--margin-bottom', str(webkit_header.margin_bottom).replace(',', '.')])
if webkit_header.margin_left :
- command.append('--margin-left %s'%(str(webkit_header.margin_left).replace(',', '.')))
+ command.extend(['--margin-left', str(webkit_header.margin_left).replace(',', '.')])
if webkit_header.margin_right :
- command.append('--margin-right %s'%(str(webkit_header.margin_right).replace(',', '.')))
+ command.extend(['--margin-right', str(webkit_header.margin_right).replace(',', '.')])
if webkit_header.orientation :
- command.append("--orientation '%s'"%(str(webkit_header.orientation).replace(',', '.')))
+ command.extend(['--orientation', str(webkit_header.orientation).replace(',', '.')])
if webkit_header.format :
- command.append(" --page-size '%s'"%(str(webkit_header.format).replace(',', '.')))
+ command.extend(['--page-size', str(webkit_header.format).replace(',', '.')])
count = 0
for html in html_list :
html_file = file(os.path.join(tmp_dir, str(time.time()) + str(count) +'.body.html'), 'w')
@@ -145,17 +145,17 @@
command.append(out)
generate_command = ' '.join(command)
try:
- status = commands.getstatusoutput(generate_command)
- if status[0] :
+ status = subprocess.call(command, stderr=subprocess.PIPE) # ignore stderr
+ if status :
raise except_osv(
_('Webkit raise an error' ),
- status[1]
+ status
)
except Exception:
for f_to_del in file_to_del :
os.unlink(f_to_del)
- pdf = file(out).read()
+ pdf = file(out, 'rb').read()
for f_to_del in file_to_del :
os.unlink(f_to_del)
Follow ups