[MERGE] fix XML symbol in attendance & timesheet reports
bzr revid: fp@tinyerp.com-20121112084455-lmmujwjx79sla0d2
This commit is contained in:
commit
664997207a
|
@ -31,6 +31,7 @@ from report.interface import toxml
|
|||
from report import report_sxw
|
||||
from tools import ustr
|
||||
from tools.translate import _
|
||||
from tools import to_xml
|
||||
|
||||
one_day = relativedelta(days=1)
|
||||
month2name = [0, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
||||
|
@ -111,7 +112,7 @@ class report_custom(report_rml):
|
|||
<date>%s</date>
|
||||
<company>%s</company>
|
||||
</header>
|
||||
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name)
|
||||
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),to_xml(pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name))
|
||||
|
||||
first_date = str(month)
|
||||
som = datetime.strptime(first_date, '%Y-%m-%d %H:%M:%S')
|
||||
|
|
|
@ -31,6 +31,7 @@ import time
|
|||
from report import report_sxw
|
||||
from tools import ustr
|
||||
from tools.translate import _
|
||||
from tools import to_xml
|
||||
|
||||
def lengthmonth(year, month):
|
||||
if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))):
|
||||
|
@ -240,7 +241,7 @@ class report_custom(report_rml):
|
|||
<date>%s</date>
|
||||
<company>%s</company>
|
||||
</header>
|
||||
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name)
|
||||
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),to_xml(pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name))
|
||||
|
||||
# Computing the xml
|
||||
xml='''<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
|
|
@ -28,6 +28,7 @@ import time
|
|||
import pooler
|
||||
from report import report_sxw
|
||||
from tools import ustr
|
||||
from tools import to_xml
|
||||
|
||||
def lengthmonth(year, month):
|
||||
if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))):
|
||||
|
@ -94,7 +95,7 @@ class report_custom(report_rml):
|
|||
<date>%s</date>
|
||||
<company>%s</company>
|
||||
</header>
|
||||
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,user_id).company_id.name)
|
||||
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),to_xml(pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,user_id).company_id.name))
|
||||
|
||||
account_xml = []
|
||||
for account, telems in accounts.iteritems():
|
||||
|
|
Loading…
Reference in New Issue