Merge commit 'origin/master' into mandriva

bzr revid: p_christ@hol.gr-20080925220128-whymn5kkyo9fx87k
This commit is contained in:
P. Christeas 2008-09-26 01:01:28 +03:00
commit c9bef54c28
5 changed files with 13 additions and 8 deletions

View File

@ -676,7 +676,6 @@ class related(function):
return res
def __init__(self,*arg,**args):
print arg
self.arg = arg
super(related, self).__init__(self._fnct_read, arg, fnct_inv_arg=arg,method=True, fnct_search=self._fnct_search,**args)

View File

@ -100,9 +100,13 @@ class report_rml(report_int):
# file('/tmp/terp.rml','wb+').write(rml)
pool = pooler.get_pool(cr.dbname)
ir_actions_report_xml_obj = pool.get('ir.actions.report.xml')
report_xml_ids = ir_actions_report_xml_obj.search(cr, uid,
[('report_name', '=', self.name[7:])], context=context)
self.title = ir_actions_report_xml_obj.browse(cr,uid,report_xml_ids)[0].name
try:
report_xml_ids = ir_actions_report_xml_obj.search(cr, uid,
[('report_name', '=', self.name[7:])], context=context)
self.title = ir_actions_report_xml_obj.browse(cr,uid,report_xml_ids)[0].name
except:
print 'Report not Found !'
self.title = 'Unknown'
report_type = datas.get('report_type', 'pdf')
create_doc = self.generators[report_type]
pdf = create_doc(rml, title=self.title)

View File

@ -141,6 +141,8 @@ class report_printscreen_list(report_int):
line[f] = line[f][1]
if fields[f]['type'] in ('one2many','many2many') and line[f]:
line[f] = '( '+str(len(line[f])) + ' )'
if fields[f]['type'] in ('float','integer'):
line[f]=round(line[f],2)
col = new_doc.createElement("col")
col.setAttribute('tree','no')
if line[f] != None:

View File

@ -128,7 +128,6 @@ class report_printscreen_list(report_int):
t += fields[f].get('size', 80) / 28 + 1
l.append(s)
for pos in range(len(l)):
if not l[pos]:
s = fields[fields_order[pos]].get('size', 80) / 28 + 1
@ -152,7 +151,6 @@ class report_printscreen_list(report_int):
count = len(fields_order)
for i in range(0,count):
tsum.append(0)
for line in results:
node_line = new_doc.createElement("row")
@ -163,6 +161,8 @@ class report_printscreen_list(report_int):
line[f] = line[f][1]
if fields[f]['type'] in ('one2many','many2many') and line[f]:
line[f] = '( '+str(len(line[f])) + ' )'
if fields[f]['type'] in ('float','integer'):
line[f]=round(line[f],2)
col = new_doc.createElement("col")
col.setAttribute('para','yes')
col.setAttribute('tree','no')

View File

@ -358,12 +358,12 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
if debug:
s.debuglevel = 5
s.connect(config['smtp_server'], config['smtp_port'])
if ssl:
s.ehlo()
s.starttls()
s.ehlo()
s.connect(config['smtp_server'], config['smtp_port'])
if config['smtp_user'] or config['smtp_password']:
s.login(config['smtp_user'], config['smtp_password'])
s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), msg.as_string())
@ -423,12 +423,12 @@ def email_send_attach(email_from, email_to, subject, body, email_cc=None, email_
if debug:
s.debuglevel = 5
s.connect(config['smtp_server'], config['smtp_port'])
if ssl:
s.ehlo()
s.starttls()
s.ehlo()
s.connect(config['smtp_server'], config['smtp_port'])
if config['smtp_user'] or config['smtp_password']:
s.login(config['smtp_user'], config['smtp_password'])
s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), msg.as_string())