add Copyright and GPL license into the Header of Python files
[odoo/odoo.git] / bin / report / printscreen / ps_list.py
index 68e1553..e3ce11c 100644 (file)
@@ -1,7 +1,8 @@
 ##############################################################################
 #
-# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
-#                    Fabien Pinckaers <fp@tiny.Be>
+# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
+#
+# $Id$
 #
 # WARNING: This program as such is intended to be used by professional
 # programmers who take the whole responsability of assessing all potential
@@ -57,7 +58,7 @@ class report_printscreen_list(report_int):
                return result
 
        def _parse_string(self, view):
-               dom = minidom.parseString(view.encode('utf-8'))
+               dom = minidom.parseString(unicode(view, 'utf-8').encode('utf-8'))
                return self._parse_node(dom)
 
        def create(self, cr, uid, ids, datas, context=None):
@@ -82,7 +83,7 @@ class report_printscreen_list(report_int):
 
 
        def _create_table(self, uid, ids, fields, fields_order, results, context, title=''):
-               pageSize=[210.0,297.0]
+               pageSize=[297.0, 210.0]
 
                impl = minidom.getDOMImplementation()
                new_doc = impl.createDocument(None, "report", None)
@@ -175,7 +176,7 @@ class report_printscreen_list(report_int):
                node_line = new_doc.createElement("row")
                lines.appendChild(node_line)
                node_line = new_doc.createElement("row")
-               for f in range(0,count):
+               for f in range(0,count+1):
                        col = new_doc.createElement("col")
                        col.setAttribute('para','yes')
                        col.setAttribute('tree','no')