From 204ecec4f28ca095de960de798ada77c16272e8d Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Fri, 25 Feb 2011 12:24:03 +0530 Subject: [PATCH] [IMP] crm, emails,crm_partner_assign:- change model name crm_send_new_email_attachment with crm_add_note_email_attachment in crm module, and bug fix of web-client wizard not close must return thy type:ir.action.act_window.close' in button click bzr revid: ysa@tinyerp.com-20110225065403-expnty80rkb9m2jr --- addons/crm/wizard/crm_add_note.py | 8 ++++---- .../crm_partner_assign/wizard/crm_forward_to_partner.py | 4 ++-- .../email_template/wizard/email_template_send_wizard.py | 4 ++-- addons/emails/wizard/email_compose_message.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/crm/wizard/crm_add_note.py b/addons/crm/wizard/crm_add_note.py index e9919c059db..ff89f56cd9d 100644 --- a/addons/crm/wizard/crm_add_note.py +++ b/addons/crm/wizard/crm_add_note.py @@ -5,8 +5,8 @@ import base64 AVAILABLE_STATES = crm.AVAILABLE_STATES + [('unchanged', 'Unchanged')] -class crm_send_new_email_attachment(osv.osv_memory): - _name = 'crm.send.mail.attachment' +class crm_add_note_email_attachment(osv.osv_memory): + _name = 'crm.add.note.email.attachment' _columns = { 'binary' : fields.binary('Attachment', required=True), @@ -14,7 +14,7 @@ class crm_send_new_email_attachment(osv.osv_memory): 'wizard_id' : fields.many2one('crm.add.note', 'Wizard', required=True), } -crm_send_new_email_attachment() +crm_add_note_email_attachment() class crm_add_note(osv.osv_memory): """Adds a new note to the case.""" @@ -25,7 +25,7 @@ class crm_add_note(osv.osv_memory): 'body': fields.text('Note Body', required=True), 'state': fields.selection(AVAILABLE_STATES, string='Set New State To', required=True), - 'attachment_ids' : fields.one2many('crm.send.mail.attachment', 'wizard_id'), + 'attachment_ids' : fields.one2many('crm.add.note.email.attachment', 'wizard_id'), } def action_add(self, cr, uid, ids, context=None): diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py index ae653ec9c92..9086750aeec 100644 --- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py +++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py @@ -170,14 +170,14 @@ class crm_lead_forward_to_partner(osv.osv_memory): context = {} super(crm_lead_forward_to_partner, self).save_to_drafts(cr, uid, ids, context=context) self.action_forward(cr, uid, ids, context) - return {} + return {'type': 'ir.actions.act_window_close'} def send_mail(self, cr, uid, ids, context=None): if context is None: context = {} super(crm_lead_forward_to_partner, self).send_mail(cr, uid, ids, context=context) self.action_forward(cr, uid, ids, context) - return {} + return {'type': 'ir.actions.act_window_close'} def action_forward(self, cr, uid, ids, context=None): """ diff --git a/addons/email_template/wizard/email_template_send_wizard.py b/addons/email_template/wizard/email_template_send_wizard.py index 8911e406a85..4cd2e5294c2 100644 --- a/addons/email_template/wizard/email_template_send_wizard.py +++ b/addons/email_template/wizard/email_template_send_wizard.py @@ -133,13 +133,13 @@ class email_template_send_wizard(osv.osv_memory): context = {} mailid = self.save_to_mailbox(cr, uid, ids, context=context) self.pool.get('email.message').write(cr, uid, mailid, {'folder':'drafts', 'state': 'draft'}, context) - return {} + return {'type': 'ir.actions.act_window_close'} def send_mail(self, cr, uid, ids, context=None): if context is None: context = {} mailid = self.save_to_mailbox(cr, uid, ids, context) - return {} + return {'type': 'ir.actions.act_window_close'} def get_generated(self, cr, uid, ids=None, context=None): if ids is None: diff --git a/addons/emails/wizard/email_compose_message.py b/addons/emails/wizard/email_compose_message.py index 1f4dfb464be..96fe112c533 100644 --- a/addons/emails/wizard/email_compose_message.py +++ b/addons/emails/wizard/email_compose_message.py @@ -141,13 +141,13 @@ class email_compose_message(osv.osv_memory): context = {} email_id = self.save_to_mailbox(cr, uid, ids, context=context) self.pool.get('email.message').write(cr, uid, email_id, {'folder':'drafts', 'state': 'draft'}, context) - return {} + return {'type': 'ir.actions.act_window_close'} def send_mail(self, cr, uid, ids, context=None): if context is None: context = {} email_id = self.save_to_mailbox(cr, uid, ids, context) - return {} + return {'type': 'ir.actions.act_window_close'} def save_to_mailbox(self, cr, uid, ids, context=None): email_ids = []