diff --git a/bin/addons/base/report/corporate_defaults.xml b/bin/addons/base/report/corporate_defaults.xml
new file mode 100644
index 00000000000..cef5acdd020
--- /dev/null
+++ b/bin/addons/base/report/corporate_defaults.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bin/addons/base/report/corporate_odt_header.xml b/bin/addons/base/report/corporate_odt_header.xml
new file mode 100644
index 00000000000..b27eeda8ccb
--- /dev/null
+++ b/bin/addons/base/report/corporate_odt_header.xml
@@ -0,0 +1,248 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tiny sprl
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+ Phone :
+
+
+
+
+
+
+
+ Mail :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contact : Administrator
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/bin/addons/base/report/corporate_sxw_header.xml b/bin/addons/base/report/corporate_sxw_header.xml
new file mode 100644
index 00000000000..2f6f885f3ba
--- /dev/null
+++ b/bin/addons/base/report/corporate_sxw_header.xml
@@ -0,0 +1,246 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ company.partner_id.name ]]
+
+
+ [[ company.rml_header1 ]]
+
+
+
+ [[ company.partner_id.address and company.partner_id.address[0].street ]]
+ [[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]
+
+
+
+
+
+ Phone :
+
+
+ [[ company.partner_id.address and company.partner_id.address[0].phone ]]
+
+
+
+
+ Mail :
+
+
+ [[ company.partner_id.address and company.partner_id.address[0].email ]]
+
+
+
+
+
+
+
+
+
+
+ [[ company.rml_footer1 ]]
+ [[ company.rml_footer2 ]]
+ Contact : [[ user.name ]]
+
+
+
+
+
+
+
+
diff --git a/bin/addons/base/report/custom_report.xml b/bin/addons/base/report/custom_report.xml
new file mode 100644
index 00000000000..c7c4cedbb33
--- /dev/null
+++ b/bin/addons/base/report/custom_report.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/bin/addons/base/report/custom_view.xml b/bin/addons/base/report/custom_view.xml
new file mode 100644
index 00000000000..ebc084668b7
--- /dev/null
+++ b/bin/addons/base/report/custom_view.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/bin/addons/base/res/res_company.py b/bin/addons/base/res/res_company.py
index 59bc0ab4ef5..2158035abb3 100644
--- a/bin/addons/base/res/res_company.py
+++ b/bin/addons/base/res/res_company.py
@@ -21,6 +21,7 @@
##############################################################################
from osv import fields,osv
+import os
import tools
class res_company(osv.osv):
@@ -122,7 +123,7 @@ class res_company(osv.osv):
"""
def _get_header(self,cr,uid,ids):
try :
- return tools.file_open('custom/corporate_rml_header.rml').read()
+ return tools.file_open(os.path.join('base', 'report', 'corporate_rml_header.rml')).read()
except:
return """
diff --git a/bin/report/interface.py b/bin/report/interface.py
index e872cc77fd3..bb71f201a8d 100644
--- a/bin/report/interface.py
+++ b/bin/report/interface.py
@@ -20,7 +20,8 @@
#
##############################################################################
-import os,re
+import os
+import re
#Ged> Why do we use libxml2 here instead of xml.dom like in other places of the code?
import libxml2
@@ -120,7 +121,7 @@ class report_rml(report_int):
pos_xml = i.end()
doc = print_xml.document(cr, uid, {}, {})
- tmpl_path = addons.get_module_resource('custom', 'corporate_defaults.xml')
+ tmpl_path = addons.get_module_resource('base', 'report', 'corporate_defaults.xml')
doc.parse(tmpl_path, [uid], 'res.users', context)
corporate_header = doc.xml_get()
doc.close()
diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py
index cec9e630c93..d34e0c1e2d0 100644
--- a/bin/report/report_sxw.py
+++ b/bin/report/report_sxw.py
@@ -715,10 +715,8 @@ class report_sxw(report_rml):
if want_header:
#Add corporate header/footer
- if report_type=='odt':
- rml = tools.file_open('custom/corporate_odt_header.xml').read()
- if report_type=='sxw':
- rml = tools.file_open('custom/corporate_sxw_header.xml').read()
+ if report_type in ('odt', 'sxw'):
+ rml = tools.file_open(os.path.join('base', 'report', 'corporate_%s_header.xml' % report_type)).read()
rml_parser = self.parser(cr, uid, self.name2, context)
rml_parser.parents = sxw_parents
rml_parser.tag = sxw_tag