email setup + camadeus logo and favicon

develop
Andreas Brückl 2015-02-25 10:14:06 +01:00
parent 0c784f3607
commit b4a728ad38
5 changed files with 25 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -71,6 +71,7 @@ def main():
'set_dokumentennummern',
'set_dmi_noupdate',
'dmi_confirm_inventory',
'setup_mail_server',
]
if cmd == 'update':

View File

@ -28,8 +28,17 @@ class Config():
'rml_header1': False,
'vat_check_vies': True,
'tax_calculation_rounding_method': 'round_globally',
#'rml_header' : './ext/addons/custom_reports/report/page.rml', # Report File
'logo': '../ext/custom-addons/cam_reports/logo.png',
'logo': '../ext/custom-addons/cam_custom/static/src/img/logo.png',
}
self.mail_server = {
'name': 'test',
'sequence': 0,
'smtp_host': 'smtp.1und1.de',
'smtp_port': '465',
'smtp_encryption': 'ssl',
'smtp_user': 'test',
'smtp_pass': 'test',
}
# Nur für Lager

View File

@ -522,3 +522,16 @@ class CamadeusFunctions():
return False
return True
def setup_mail_server(self):
"""Mailserver einrichten"""
if hasattr(self.config, 'mail_server'):
vals = self.config.mail_server
server_ids = self._execute('ir.mail_server', 'search', [('name','=',vals.get('name'))])
if server_ids:
return self._execute('ir.mail_server', 'write', server_ids, vals)
else:
return self._execute('ir.mail_server', 'create', vals)
return False