From 6504e9cc2389059d164dee2e2706442c1e0af486 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 7 May 2012 16:36:19 +0530 Subject: [PATCH] [IMP] event: Improved code. bzr revid: tpa@tinyerp.com-20120507110619-g1f6m05cmy47zb1j --- addons/event/event.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/event/event.py b/addons/event/event.py index e0f0e2c6fd4..d5aedd72f00 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -266,7 +266,6 @@ class event_event(osv.osv): def get_needaction_user_ids(self, cr, uid, ids, context=None): result = dict.fromkeys(ids, []) for obj in self.browse(cr, uid, ids, context=context): - # salesman must perform an action when in draft mode if obj.state == 'draft' and obj.user_id: result[obj.id] = [obj.user_id.id] return result @@ -285,7 +284,7 @@ class event_event(osv.osv): def button_draft_send_note(self, cr, uid, ids, context=None): for id in ids: - message = _("Event has been set to draft state.") + message = _("Event has been set to draft.") self.message_append_note(cr, uid, [id], body=message, context=context) return True @@ -447,20 +446,19 @@ class event_registration(osv.osv): def get_needaction_user_ids(self, cr, uid, ids, context=None): result = dict.fromkeys(ids, []) for obj in self.browse(cr, uid, ids, context=context): - # salesman must perform an action when in draft mode if obj.state == 'draft' and obj.user_id: result[obj.id] = [obj.user_id.id] return result def create_send_note(self, cr, uid, ids, context=None): for id in ids: - message = _("Event Registration has been created.") + message = _("Registration has been created.") self.message_append_note(cr, uid, [id], body=message, context=context) return True def do_draft_send_note(self, cr, uid, ids, context=None): for id in ids: - message = _("Event Registration has been draft.") + message = _("Registration has been draft.") self.message_append_note(cr, uid, [id], body=message, context=context) return True