[FIX] crm: State changes of all crm object shouldn't be in Email section of partner...
authoruco (OpenERP) <uco@tinyerp.com>
Thu, 25 Nov 2010 07:26:38 +0000 (12:56 +0530)
committeruco (OpenERP) <uco@tinyerp.com>
Thu, 25 Nov 2010 07:26:38 +0000 (12:56 +0530)
* mail_gateway: Open document should only open the related document.

lp bug: https://launchpad.net/bugs/680961 fixed

bzr revid: uco@tinyerp.com-20101125072638-e6gaag8svxvk6hmi

addons/mail_gateway/mail_gateway.py
addons/mail_gateway/res_partner.py
addons/mail_gateway/res_partner_view.xml

index 54bc786..443d46a 100644 (file)
@@ -200,7 +200,8 @@ class mailgate_message(osv.osv):
                 action_data = action_pool.read(cr, uid, action_ids[0], context=context)
                 action_data.update({
                     'domain' : "[('id','=',%d)]"%(res_id),
-                    'nodestroy': True
+                    'nodestroy': True,
+                    'context': {}
                     })
         return action_data
 
index 54bed6a..c6f41ff 100644 (file)
@@ -26,7 +26,7 @@ class res_partner(osv.osv):
     _inherit = 'res.partner'
     _columns = {
         'emails': fields.one2many('mailgate.message', 'partner_id',\
-                                        'Emails', readonly=True),
+                                        'Emails', readonly=True, domain=[('history','=',True)]),
     }
 
 res_partner()
index dbae434..3cb1bb7 100644 (file)
@@ -11,7 +11,7 @@
             <field name="inherit_id" ref="base.view_partner_form"/>
             <field name="arch" type="xml">
                  <page string="History" position="inside">
-                      <field name="emails" colspan="4" nolabel="1" domain="[('history', '=', True)]"/>
+                      <field name="emails" colspan="4" nolabel="1"/>
                  </page>
             </field>
        </record>