00001 ############################################################################## 00002 # 00003 # Copyright (c) 2007-2008 Albert Cervera i Areny <albert@nan-tic.com> 00004 # 00005 # WARNING: This program as such is intended to be used by professional 00006 # programmers who take the whole responsability of assessing all potential 00007 # consequences resulting from its eventual inadequacies and bugs 00008 # End users who are looking for a ready-to-use solution with commercial 00009 # garantees and support are strongly adviced to contract a Free Software 00010 # Service Company 00011 # 00012 # This program is Free Software; you can redistribute it and/or 00013 # modify it under the terms of the GNU General Public License 00014 # as published by the Free Software Foundation; either version 2 00015 # of the License, or (at your option) any later version. 00016 # 00017 # This program is distributed in the hope that it will be useful, 00018 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 # GNU General Public License for more details. 00021 # 00022 # You should have received a copy of the GNU General Public License 00023 # along with this program; if not, write to the Free Software 00024 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00025 # 00026 ############################################################################## 00027 00028 ## @brief KooApi class provides an interface several Koo components relay on being 00029 # available for their proper use. 00030 class KooApi: 00031 ## @brief Executes the given actionId (which can be a report, keword, etc.). 00032 def execute(self, actionId, data={}, type=None, context={}): 00033 pass 00034 00035 ## @brief Executes the server action to open a report. 00036 def executeReport(self, name, data={}, context={}): 00037 return True 00038 00039 ## @brief Executes the given server action (which can ba report, keyword, etc.). 00040 def executeAction(self, action, data={}, context={}): 00041 pass 00042 00043 ## @brief Executes the given server keyword action. 00044 def executeKeyword(self, keyword, data={}, context={}): 00045 return False 00046 00047 ## @brief Opens a new window (a new tab with Koo application) with the given model. 00048 def createWindow(self, view_ids, model, res_id=False, domain=None, 00049 view_type='form', window=None, context=None, mode=None, name=False, autoReload=False, 00050 target='current'): 00051 pass 00052 00053 ## @brief Opens a new window (a new tab with Koo application) with the given url. 00054 def createWebWindow(self, url, title): 00055 pass 00056 00057 ## @brief This callback function is (should be) executed each time a new window (tab in Koo) is opened. 00058 def windowCreated(self, window, target): 00059 pass 00060 00061 # This variable should point to a KooApi instance 00062 instance = None