[IMP] mail: improvements in email message form view and removed msg.get_unixfrom() causing errors and corrected it in email_thread.py
bzr revid: rha@tinyerp.com-20110404104203-g6ksbb0q6zz5y9sp
This commit is contained in:
parent
47a85e9f8f
commit
4d3b805cf9
|
@ -325,6 +325,7 @@ class crm_lead(crm_case, osv.osv):
|
|||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks
|
||||
@param msg: dictionary object to contain email message data
|
||||
"""
|
||||
thread_pool = self.pool.get('email.thread')
|
||||
|
||||
|
@ -343,7 +344,7 @@ class crm_lead(crm_case, osv.osv):
|
|||
if msg.get('priority', False):
|
||||
vals['priority'] = priority
|
||||
|
||||
res = thread_pool.get_partner(cr, uid, msg.get('from') or msg.get_unixfrom())
|
||||
res = thread_pool.get_partner(cr, uid, msg.get('from', False))
|
||||
if res:
|
||||
vals.update(res)
|
||||
|
||||
|
|
|
@ -179,6 +179,7 @@ class crm_claim(crm.crm_case, osv.osv):
|
|||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks
|
||||
@param msg: dictionary object to contain email message data
|
||||
"""
|
||||
thread_pool = self.pool.get('email.thread')
|
||||
|
||||
|
@ -197,7 +198,7 @@ class crm_claim(crm.crm_case, osv.osv):
|
|||
if msg.get('priority', False):
|
||||
vals['priority'] = priority
|
||||
|
||||
res = thread_pool.get_partner(cr, uid, msg.get('from') or msg.get_unixfrom())
|
||||
res = thread_pool.get_partner(cr, uid, msg.get('from', False))
|
||||
if res:
|
||||
vals.update(res)
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ class crm_helpdesk(crm.crm_case, osv.osv):
|
|||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks
|
||||
@param msg: dictionary object to contain email message data
|
||||
"""
|
||||
thread_pool = self.pool.get('email.thread')
|
||||
|
||||
|
@ -121,7 +122,7 @@ class crm_helpdesk(crm.crm_case, osv.osv):
|
|||
if msg.get('priority', False):
|
||||
vals['priority'] = priority
|
||||
|
||||
res = thread_pool.get_partner(cr, uid, msg.get('from') or msg.get_unixfrom())
|
||||
res = thread_pool.get_partner(cr, uid, msg.get('from', False))
|
||||
if res:
|
||||
vals.update(res)
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ class email_thread(osv.osv):
|
|||
msg['content-type'] = msg_txt.get('Content-Type')
|
||||
|
||||
if 'From' in fields:
|
||||
msg['from'] = self._decode_header(msg_txt.get('From'))
|
||||
msg['from'] = self._decode_header(msg_txt.get('From') or msg_txt.get_unixfrom())
|
||||
|
||||
if 'Delivered-To' in fields:
|
||||
msg['to'] = self._decode_header(msg_txt.get('Delivered-To'))
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<field name="date"/>
|
||||
<field name="user_id" string="User"/>
|
||||
<field name="partner_id" readonly="1" />
|
||||
<field name="priority"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
|
@ -31,21 +32,20 @@
|
|||
<separator string="Message Details" colspan="4"/>
|
||||
<field name="model" readonly="1"/>
|
||||
<group col="3" colspan="2">
|
||||
<field name="res_id" readonly="1"/>
|
||||
<field name="res_id" readonly="1" groups="base.group_extended"/>
|
||||
<button name="open_document" string="Open Document" type="object" icon="gtk-jump-to"/>
|
||||
<field name="message_id"/>
|
||||
<button name="%(action_email_compose_message_wizard)d" string="Reply" type="action" icon="terp-mail-replied"
|
||||
context="{'mail':'reply', 'message_id':active_id}"/>
|
||||
<field name="message_id" groups="base.group_extended" colspan="4"/>
|
||||
</group>
|
||||
<field name="references" widget="char" size="4096"/>
|
||||
<field name="references" widget="char" size="4096" groups="base.group_extended"/>
|
||||
</group>
|
||||
<separator string="Description" colspan="4"/>
|
||||
<field name="body" nolabel="1" colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<separator string="" colspan="4"/>
|
||||
<field name="state"/>
|
||||
<button name="process_email_queue" string="Send" type="object" icon="gtk-execute" states='draft,waiting,sending'/>
|
||||
<button name="process_retry" string="Re-Try" type="object" icon="gtk-execute" states='exception'/>
|
||||
<field name="state" attrs="{'invisible': [('state', '==', False)]}"/>
|
||||
<button name="%(action_email_compose_message_wizard)d" string="Reply" type="action" icon="terp-mail-replied"
|
||||
context="{'mail':'reply', 'message_id':active_id}" colspan="2"/>
|
||||
<button name="process_email_queue" string="Force send" type="object" icon="gtk-execute" states='exception' colspan="2"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Attachments">
|
||||
|
@ -56,11 +56,11 @@
|
|||
<group col="4" colspan="4">
|
||||
<field name="smtp_server_id"/>
|
||||
<field name="sub_type"/>
|
||||
<field name="headers"/>
|
||||
<field name="priority"/>
|
||||
<field name="debug"/>
|
||||
<field name="debug" groups="base.group_extended"/>
|
||||
<field name="history"/>
|
||||
<field name="auto_delete"/>
|
||||
<separator string="xheaders" colspan="4"/>
|
||||
<field name="headers" colspan="4" nolabel="1" groups="base.group_extended"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
@ -130,12 +130,6 @@
|
|||
src_model="res.partner"
|
||||
view_id="view_email_message_tree"/>
|
||||
|
||||
<act_window
|
||||
id="act_res_partner_open_email" name="Attachments"
|
||||
res_model="ir.attachment"
|
||||
src_model="email.message"
|
||||
domain="[('res_id', '=', res_id),('res_model','=',model)]"/>
|
||||
|
||||
<menuitem name="Email" id="menu_email_message_tools"
|
||||
parent="base.menu_tools" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue