diff --git a/addons/thunderbird/partner/partner.py b/addons/thunderbird/partner/partner.py index 1c028a9e019..825c4f6fc8c 100644 --- a/addons/thunderbird/partner/partner.py +++ b/addons/thunderbird/partner/partner.py @@ -182,12 +182,10 @@ class thunderbird_partner(osv.osv_memory): #@param message: string of mail which is read from EML File #@return model,res_id dictcreate = dict(message) - message = dictcreate.get('message') + message_id = dictcreate.get('message_id') msg_pool = self.pool.get('mailgate.message') - msg = self.pool.get('email.server.tools').parse_message(message) - message_id = msg.get('message-id', False) - model = False - res_id = False + model = '' + res_id = 0 if message_id: msg_ids = msg_pool.search(cr, uid, [('message_id','=',message_id)]) if msg_ids and len(msg_ids): @@ -196,6 +194,7 @@ class thunderbird_partner(osv.osv_memory): res_id = msg.res_id return (model,res_id) + def search_contact(self, cr, user, email): address_pool = self.pool.get('res.partner.address') address_ids = address_pool.search(cr, user, [('email','=',email)]) @@ -314,14 +313,16 @@ class thunderbird_partner(osv.osv_memory): def list_allcountry(self,cr,user,vals): country_list = [] - cr.execute("SELECT id, name from res_country") + cr.execute("SELECT id, name from res_country order by name") country_list = cr.fetchall() return country_list + def list_allstate(self,cr,user,vals): - cr.execute("SELECT id, name from res_country_state") - state_country_list = cr.fetchall() - return state_country_list + cr.execute("select id, name from res_country_state where country_id = %s order by name",(vals,) ) + state_country_list = cr.fetchall() + return state_country_list + def search_document_attachment(self,cr,user,vals): model_obj = self.pool.get('ir.model') diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi index b094c776c31..abcc254c869 100644 Binary files a/addons/thunderbird/plugin/openerp_plugin.xpi and b/addons/thunderbird/plugin/openerp_plugin.xpi differ diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar index fcc567c7f13..5666b96546e 100644 Binary files a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar and b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar differ diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/create.xul b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/create.xul index 41109b1c27b..0aeb4a9f16b 100644 --- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/create.xul +++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/create.xul @@ -3,7 +3,7 @@ + title="&title.label;" onload="myPrefObserver.createContact();" height="460" width="860"> @@ -57,7 +57,7 @@