[IMP] email.compose.message: removed method save_to_drafts() and did related changes for this

bzr revid: rha@tinyerp.com-20110407045607-tub41samcup20t5d
This commit is contained in:
Rifakat Haradwala (Open ERP)
2011-04-07 10:26:07 +05:30
parent a7663db771
commit afc74ed47f
6 changed files with 1 additions and 28 deletions
@@ -171,13 +171,6 @@ class crm_lead_forward_to_partner(osv.osv_memory):
email = self.pool.get('res.partner.address').browse(cr, uid, address_id).email
return {'value': {'email_to' : email}}
def save_to_drafts(self, cr, uid, ids, context=None):
if context is None:
context = {}
super(crm_lead_forward_to_partner, self).save_to_drafts(cr, uid, ids, context=context)
self.action_forward(cr, uid, ids, context)
return {'type': 'ir.actions.act_window_close'}
def send_mail(self, cr, uid, ids, context=None):
if context is None:
context = {}
@@ -46,7 +46,6 @@
<group col="4" colspan="4">
<label string="" colspan="1"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-apply" name="save_to_drafts" string="Save in Drafts" type="object"/>
<button icon="gtk-ok" name="send_mail" string="Send now" type="object"/>
</group>
</form>
@@ -128,13 +128,6 @@ class email_template_send_wizard(osv.osv_memory):
# result['attachment_ids']['domain'] = [('res_model','=',context['src_model']),('res_id','=',context['active_id'])]
# return result
def save_to_drafts(self, cr, uid, ids, context=None):
if context is None:
context = {}
mailid = self.save_to_mailbox(cr, uid, ids, context=context)
self.pool.get('email.message').write(cr, uid, mailid, {'state': 'outgoing'}, context)
return {'type': 'ir.actions.act_window_close'}
def send_mail(self, cr, uid, ids, context=None):
if context is None:
context = {}
@@ -33,7 +33,7 @@
<field name="attachment_ids" colspan="4" nolabel="1"/>
</page>
</notebook>
</group>
<field name="state" invisible="1"/>
<group col="4" colspan="4" attrs="{'invisible':[('state','=','single')]}">
@@ -52,12 +52,8 @@
</group>
<group col="4" colspan="2" attrs="{'invisible':[('state','!=','single')]}">
<button icon="gtk-cancel" special="cancel" string="Discard"/>
<button icon="gtk-apply" name="save_to_drafts" string="Save in Drafts" type="object"/>
<button icon="gtk-ok" name="send_mail" string="Send now" type="object"/>
</group>
</form>
</field>
</record>
@@ -192,13 +192,6 @@ class email_compose_message(osv.osv_memory):
return {'value': result}
def save_to_drafts(self, cr, uid, ids, context=None):
if context is None:
context = {}
email_id = self.save_to_mailbox(cr, uid, ids, context=context)
self.pool.get('email.message').write(cr, uid, email_id, {'state': 'outgoing'}, context)
return {'type': 'ir.actions.act_window_close'}
def send_mail(self, cr, uid, ids, context=None):
if context is None:
context = {}
@@ -33,7 +33,6 @@
<group col="4" colspan="4">
<label string="" colspan="1"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-apply" name="save_to_drafts" string="Save in Drafts" type="object"/>
<button icon="gtk-ok" name="send_mail" string="Send now" type="object"/>
</group>
</form>