Anup(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-16976-ach into 
lp:openobject-addons/6.0.

Requested reviews:
  Jay Vora (OpenERP) (jvo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-16976-ach/+merge/72171

Hello,

The field 'description' of mailgate.message was misbehaving when  adding an 
internal note from crm_*,project_*,event,hr_recruitment etc.

This fixes the issue.

There is also a refactoring in mail_gateway.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-16976-ach/+merge/72171
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-16976-ach.
=== modified file 'crm/crm_lead_view.xml'
--- crm/crm_lead_view.xml	2011-01-14 00:11:01 +0000
+++ crm/crm_lead_view.xml	2011-08-19 11:00:30 +0000
@@ -185,17 +185,15 @@
                             </group>
                             <notebook colspan="4">
                                 <page string="Details">
-                                    <group attrs="{'invisible': [('history', '!=', True)]}">
+                                    <group>
                                         <field name="description" colspan="4" nolabel="1" height="250"/>
                                         <button colspan="4"
                                             string="Reply"
+                                            attrs="{'invisible': [('history', '!=', True)]}"
                                             name="%(crm.action_crm_send_mail)d"
                                             context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
                                             icon="terp-mail-replied" type="action" />
                                     </group>
-                                    <group attrs="{'invisible': [('history', '=', True)]}">
-                                        <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-                                    </group>
                                 </page>
                                 <page string="Attachments">
                                     <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>

=== modified file 'crm/crm_opportunity_view.xml'
--- crm/crm_opportunity_view.xml	2011-01-14 00:11:01 +0000
+++ crm/crm_opportunity_view.xml	2011-08-19 11:00:30 +0000
@@ -171,17 +171,15 @@
                                     </group>
                                     <notebook colspan="4">
                                         <page string="Details">
-                                            <group attrs="{'invisible': [('history', '!=', True)]}">
+                                            <group>
                                                 <field name="description" colspan="4" nolabel="1" height="250"/>
                                                 <button colspan="4"
                                                     string="Reply"
+                                                    attrs="{'invisible': [('history', '!=', True)]}"
                                                     name="%(crm.action_crm_send_mail)d"
                                                     context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
                                                     icon="terp-mail-replied" type="action" />
                                             </group>
-                                            <group attrs="{'invisible': [('history', '=', True)]}">
-                                                <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-                                            </group>
                                         </page>
                                         <page string="Attachments">
                                             <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>

=== modified file 'crm_claim/crm_claim_view.xml'
--- crm_claim/crm_claim_view.xml	2011-01-14 09:34:28 +0000
+++ crm_claim/crm_claim_view.xml	2011-08-19 11:00:30 +0000
@@ -181,17 +181,15 @@
                                         </group>
                                         <notebook colspan="4">
                                             <page string="Details">
-                                                <group attrs="{'invisible': [('history', '!=', True)]}">
+                                                <group>
                                                     <field name="description" colspan="4" nolabel="1" height="250"/>
                                                     <button colspan="4"
                                                         string="Reply"
+                                                        attrs="{'invisible': [('history', '!=', True)]}"
                                                         name="%(crm.action_crm_send_mail)d"
                                                         context="{'mail':'reply', 'model': 'crm.claim', 'include_original' : True}"
                                                         icon="terp-mail-replied" type="action" />
                                                 </group>
-                                                <group attrs="{'invisible': [('history', '=', True)]}">
-                                                    <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-                                                </group>
                                             </page>
                                             <page string="Attachments">
                                                 <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>

=== modified file 'crm_fundraising/crm_fundraising_view.xml'
--- crm_fundraising/crm_fundraising_view.xml	2011-01-14 00:11:01 +0000
+++ crm_fundraising/crm_fundraising_view.xml	2011-08-19 11:00:30 +0000
@@ -165,17 +165,15 @@
                                     </group>
                                     <notebook colspan="4">
                                         <page string="Details">
-                                            <group attrs="{'invisible': [('history', '!=', True)]}">
+                                            <group>
                                                 <field name="description" colspan="4" nolabel="1" height="250"/>
                                                 <button colspan="4"
                                                     string="Reply"
+                                                    attrs="{'invisible': [('history', '!=', True)]}"
                                                     name="%(crm.action_crm_send_mail)d"
                                                     context="{'mail':'reply', 'model': 'crm.fundraising', 'include_original' : True}"
                                                     icon="terp-mail-replied" type="action" />
                                             </group>
-                                            <group attrs="{'invisible': [('history', '=', True)]}">
-                                                <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-                                            </group>
                                         </page>
                                         <page string="Attachments">
                                             <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>

=== modified file 'crm_helpdesk/crm_helpdesk_view.xml'
--- crm_helpdesk/crm_helpdesk_view.xml	2011-03-15 12:25:14 +0000
+++ crm_helpdesk/crm_helpdesk_view.xml	2011-08-19 11:00:30 +0000
@@ -117,17 +117,15 @@
                                     </group>
                                     <notebook colspan="4">
                                         <page string="Details">
-                                            <group attrs="{'invisible': [('history', '!=', True)]}">
+                                            <group>
                                                 <field name="description" colspan="4" nolabel="1" height="250"/>
                                                 <button colspan="4"
                                                     string="Reply"
+                                                    attrs="{'invisible': [('history', '!=', True)]}"
                                                     name="%(crm.action_crm_send_mail)d"
                                                     context="{'mail':'reply', 'model': 'crm.helpdesk', 'include_original' : True}"
                                                     icon="terp-mail-replied" type="action" />
                                              </group>
-                                            <group attrs="{'invisible': [('history', '=', True)]}">
-                                                <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-                                            </group>
                                         </page>
                                         <page string="Attachments">
                                             <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>

=== modified file 'event/event_view.xml'
--- event/event_view.xml	2011-01-14 00:11:01 +0000
+++ event/event_view.xml	2011-08-19 11:00:30 +0000
@@ -408,17 +408,15 @@
                                     </group>
                                     <notebook colspan="4">
                                         <page string="Details">
-                                            <group attrs="{'invisible': [('history', '!=', True)]}">
+                                            <group>
                                                 <field name="description" colspan="4" nolabel="1" height="250"/>
                                                 <button colspan="4"
                                                     string="Reply"
+                                                    attrs="{'invisible': [('history', '!=', True)]}"
                                                     name="%(crm.action_crm_send_mail)d"
                                                     context="{'mail':'reply', 'model': 'event.registration', 'include_original' : True}"
                                                     icon="terp-mail-replied" type="action" />
                                             </group>
-                                            <group attrs="{'invisible': [('history', '=', True)]}">
-                                                <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-                                            </group>
                                         </page>
                                         <page string="Attachments">
                                             <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>

=== modified file 'hr_recruitment/hr_recruitment_view.xml'
--- hr_recruitment/hr_recruitment_view.xml	2011-03-30 09:30:04 +0000
+++ hr_recruitment/hr_recruitment_view.xml	2011-08-19 11:00:30 +0000
@@ -163,17 +163,15 @@
                                 </group>
                                 <notebook colspan="4">
                                     <page string="Details">
-                                        <group attrs="{'invisible': [('history', '!=', True)]}">
+                                        <group>
                                             <field name="description" colspan="4" nolabel="1" height="250"/>
                                             <button colspan="4"
                                                 string="Reply"
+                                                attrs="{'invisible': [('history', '!=', True)]}"
                                                 name="%(crm.action_crm_send_mail)d"
                                                 context="{'mail':'reply', 'model': 'hr.applicant', 'include_original' : True}"
                                                 icon="terp-mail-replied" type="action" />
                                         </group>
-                                        <group attrs="{'invisible': [('history', '=', True)]}">
-                                            <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-                                        </group>
                                     </page>
                                     <page string="Attachments">
                                         <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>

=== modified file 'mail_gateway/mail_gateway.py'
--- mail_gateway/mail_gateway.py	2011-03-28 14:51:27 +0000
+++ mail_gateway/mail_gateway.py	2011-08-19 11:00:30 +0000
@@ -150,25 +150,18 @@
                     if isinstance(param, list):
                         param = ", ".join(param)
 
-                data = {
+                data.update({
                     'name': subject or _('History'),
                     'history': True,
-                    'user_id': uid,
-                    'model' : case._name,
-                    'res_id': case.id,
                     'date': email_date or time.strftime('%Y-%m-%d %H:%M:%S'),
-                    'description': details or (hasattr(case, 'description') and case.description or False),
                     'email_to': email,
                     'email_from': email_from or \
                         (hasattr(case, 'user_id') and case.user_id and case.user_id.address_id and \
                          case.user_id.address_id.email),
                     'email_cc': email_cc,
                     'email_bcc': email_bcc,
-                    'partner_id': partner_id,
                     'references': references,
-                    'message_id': message_id,
-                    'attachment_ids': [(6, 0, attachments)]
-                }
+                })
             obj.create(cr, uid, data, context=context)
         return True
 mailgate_thread()

=== modified file 'project_issue/project_issue_view.xml'
--- project_issue/project_issue_view.xml	2011-02-01 16:06:22 +0000
+++ project_issue/project_issue_view.xml	2011-08-19 11:00:30 +0000
@@ -118,17 +118,15 @@
                                     </group>
                                     <notebook colspan="4">
                                         <page string="Details">
-                                            <group attrs="{'invisible': [('history', '!=', True)]}">
+                                            <group>
                                                 <field name="description" colspan="4" nolabel="1" height="250"/>
                                                 <button colspan="4"
                                                     string="Reply"
+                                                    attrs="{'invisible': [('history', '!=', True)]}"
                                                     name="%(crm.action_crm_send_mail)d"
                                                     context="{'mail':'reply', 'model': 'project.issue', 'include_original' : True}"
                                                     icon="terp-mail-replied" type="action" />
                                             </group>
-                                            <group attrs="{'invisible': [('history', '=', True)]}">
-                                                <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-                                            </group>
                                         </page>
                                         <page string="Attachments">
                                             <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>

=== modified file 'project_mailgate/project_mailgate_view.xml'
--- project_mailgate/project_mailgate_view.xml	2011-01-14 00:11:01 +0000
+++ project_mailgate/project_mailgate_view.xml	2011-08-19 11:00:30 +0000
@@ -20,16 +20,12 @@
 			                                <field name="email_to" widget="char" size="512"/>
 			                                <field name="email_cc" widget="char" size="512"/>
 			                                <field name="name" colspan="4" widget="char" size="512"/>
-			                                <field name="history" invisible="1"/>
 			                            </group>
 			                            <notebook colspan="4">
 			                                <page string="Details">
-			                                    <group attrs="{'invisible': [('history', '!=', True)]}">
+			                                    <group>
 			                                        <field name="description" colspan="4" nolabel="1" height="250"/>
 			                                    </group>
-			                                    <group attrs="{'invisible': [('history', '=', True)]}">
-			                                        <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-			                                    </group>
 			                                </page>
 			                                <page string="Attachments">
 			                                    <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to