def add_action(self, user_id, doc): actiondoc = ActionDoc.create(doc, user_id) action_id = actiondoc['action_id'] self.action_manager.insert(actiondoc, action_id) logging.info(_i18n._LI('Action registered, action id: %s') % action_id) return action_id