Merge commit 'origin/master' into mandriva
bzr revid: p_christ@hol.gr-20080925220128-whymn5kkyo9fx87k
This commit is contained in:
commit
c9bef54c28
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue