Skip to content
Snippets Groups Projects
Commit 5e2b9368145e authored by Xavier Manach's avatar Xavier Manach
Browse files

generation automatic for id_bu with internal detect :

hostname_bu=tools.config.get('xmlrpc_interface')
port_bu=tools.config.get('xmlrpc_port')
database_bu=cr.dbname

Then you need configure xmlrpc_interface in config file openerp.
parent 32e59fa9f013
No related branches found
No related tags found
No related merge requests found
......@@ -20,4 +20,5 @@
#
##############################################################################
import md5
from osv import osv, fields
......@@ -23,2 +24,3 @@
from osv import osv, fields
import openerp.tools as tools
from replace import insert_tracker_in_html, insert_tracker_in_text
......@@ -24,5 +26,5 @@
from replace import insert_tracker_in_html, insert_tracker_in_text
import md5
class hooked_email_template(osv.osv):
"""overrides the base email template to hook the URL tracker
......@@ -42,8 +44,11 @@
if context.get('use_tracker', False):
# here we need to use tracker so let's do it
tracker_base = context.get('tracker_base')
#### TO DO RULES FOR GENERE id_bu !!!
id_bu='vmd:8069/camp'
#### TODO hostbame_bu configuration with configure option menu.
hostname_bu=tools.config.get('xmlrpc_interface')
port_bu=tools.config.get('xmlrpc_port')
database_bu=cr.dbname
id_bu= "%s:%s/%s" % (hostname_bu,port_bu,database_bu)
tracker_base+='/'+md5.md5(id_bu).hexdigest()
if values['body_text']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment