bzr revid: fp@tinyerp.com-20080925194050-enw8gayfgjm0b0jc
This commit is contained in:
Fabien Pinckaers 2008-09-25 21:40:50 +02:00
parent ba83be7765
commit d189e17e71
3 changed files with 9 additions and 6 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

@ -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())