~unifield-team/unifield-web/web_aio_24

« back to all changes in this revision

Viewing changes to openerp/addons/base/controllers/tinycalendar.py

  • Committer: ame (Tiny)
  • Date: 2009-11-09 12:42:57 UTC
  • Revision ID: ame@tinyerp.com-20091109124257-b1mscw0rn779ols5
[IMP] initial work on addons
        - seperated common framework api
        - created `base` addon
        - auto-load controllers based on `_cp_path` attribute

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
import time
31
31
import math
32
32
 
33
 
from openerp.tools import expose
34
 
 
35
33
import cherrypy
36
34
 
 
35
from openerp import tools
 
36
 
37
37
from openerp.tools import rpc
38
 
from openerp import tools
39
38
from openerp.tools import common
 
39
from openerp.tools import expose
 
40
from openerp.tools import TinyDict
40
41
 
41
42
from openerp.i18n import format
42
 
from openerp.tools import TinyDict
43
 
from openerp.base.controllers import SecuredController
 
43
from openerp.controllers import SecuredController
44
44
 
45
45
from form import Form
46
46
 
47
 
import openerp.widgets.tinycalendar as tc
 
47
from openerp.addons.base.widgets import tinycalendar as tc
48
48
 
49
49
class TinyCalendar(Form):
 
50
    
 
51
    _cp_path = "/calendar"
50
52
 
51
53
    @expose()
52
54
    def mini(self, year, month, forweek=False):
262
264
        return dict()
263
265
 
264
266
class CalendarPopup(Form):
 
267
    
 
268
    _cp_path = "/calpopup"
265
269
 
 
270
    # deprecated (use _cp_path)
266
271
    path = '/calpopup'    # mapping from root
267
272
 
268
273
    @expose(template="templates/calpopup.mako")