[IMP]: crm: Improvement in fwd to partner, Added remaining boolean to add as cc

bzr revid: rpa@tinyerp.com-20100512105924-ub1u241iodyzpb5u
This commit is contained in:
rpa (Open ERP)
2010-05-12 16:29:24 +05:30
parent dc9d606f5d
commit 81ba9bf55b
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -38,7 +38,8 @@ class crm_lead_forward_to_partner(osv.osv_memory):
'email_to' : fields.char('To', required=True, size=128),
'subject' : fields.char('Subject', required=True, size=128),
'message' : fields.text('Message', required=True),
'history': fields.selection([('latest', 'Latest email'), ('whole', 'Whole Story'), ('info', 'Case Information')], 'Send history', required=True),
'history': fields.selection([('latest', 'Latest email'), ('whole', 'Whole Story'), ('info', 'Case Information')], 'Send history', required=True),
'add_cc': fields.boolean('Add as CC', required=False, help="Selcect if you want this user to add as cc for this case.This user will receive all future conversations"),
}
def get_whole_history(self, cr, uid, ids, context=None):
@@ -171,7 +172,8 @@ class crm_lead_forward_to_partner(osv.osv_memory):
this.subject,
body,
)
case_pool.write(cr, uid, case.id, {'email_cc' : case.email_cc and case.email_cc + ', ' + this.email_to or this.email_to})
if this.add_cc:
case_pool.write(cr, uid, case.id, {'email_cc' : case.email_cc and case.email_cc + ', ' + this.email_to or this.email_to})
return {}
def get_lead_details(self, cr, uid, lead_id, context=None):
@@ -22,6 +22,8 @@
<field name="address_id" string="Contact" on_change="on_change_address(address_id)" colspan="2" />
</group>
<field colspan="4" name="email_to" attrs="{ 'required' : [('name','=','email')]}" />
<newline/>
<field name="add_cc" colspan="2" />
<separator string="Email" colspan="4" />
<field name="subject" colspan="4" />
<separator string="Mesage body" colspan="4" />