Ejemplo n.º 1
0
def dialogaction(action,var):
    
    cutil.printVar("test38",action,var)
    
    if action == "test1" :
        li = cutil.getDict("titles")
        for l in li : print l
        assert 2 == len(li)
        var["OK"] = True
Ejemplo n.º 2
0
def dialogaction(action, var):

    cutil.printVar("test38", action, var)

    if action == "test1":
        li = cutil.getDict("titles")
        for l in li:
            print l
        assert 2 == len(li)
        var["OK"] = True
Ejemplo n.º 3
0
 def preparePermissionForHotel(self):
     if self.hotel: seq = self.getListOfPersons()
     else: seq = self.getListOfObjects()
     if len(seq) == 0: return
     rolesdef = cutil.getDict("roles")
     map = {
         "lines": util.createSeq(seq, True),
         "columns": util.createSeq(rolesdef, False)
     }
     cutil.setJCheckList(self.var, PERM, map)
Ejemplo n.º 4
0
 def __init__(self):
     """ Constructor
     Prepares list of empty vat level using standard vat dictionary (cutil.getDict("vat"))
     """
     self.lvat = {}
     for v in cutil.getDict("vat") :
         l = v.getAttr("level")
         if l == "" : self.lvat[v.getName()] = None
         else : self.lvat[v.getName()] = float(l)
     self.bvat = {}
     self.met = 1
Ejemplo n.º 5
0
def getVatName(vat):
  list = cutil.getDict("vat")
  vat = findElemInSeq(vat,list)
  if vat == None : return ""
  return vat.getDescription()
Ejemplo n.º 6
0
def getVatName(vat):
    list = cutil.getDict("vat")
    vat = findElemInSeq(vat, list)
    if vat == None: return ""
    return vat.getDescription()
Ejemplo n.º 7
0
import cutil

from util import util
from com.gwthotel.hotel.services import HotelServices
import cutil
import xmlutil

M = util.MESS()
taxList = cutil.getDict("vat")
D = util.HOTELDEFADATA()

# -------------


def _createList(var):
    serv = util.SERVICES(var)
    seq = serv.getRoomServices()
    list = []

    for s in seq:
        list.append({
            "name": s.getName(),
            "descr": s.getDescription(),
            "vat": s.getAttr("vat"),
            "noperson": s.getNoPersons(),
            "noextrabeds": util.getIntField(s.getNoExtraBeds()),
            "nochildren": util.getIntField(s.getNoChildren()),
            "perperson": s.isPerperson(),
            "vatname": util.getVatName(s.getAttr("vat"))
        })
Ejemplo n.º 8
0
import cutil

from util import util
from com.gwthotel.hotel.services import HotelServices
import cutil
import xmlutil

M = util.MESS()
taxList = cutil.getDict("vat")
D = util.HOTELDEFADATA()

# -------------

def _createList(var):
    serv = util.SERVICES(var)
    seq = serv.getRoomServices()
    list = []
    
    for s in seq : 
       list.append({"name" : s.getName(), "descr" : s.getDescription(), 
                    "vat" : s.getAttr("vat"), "noperson" : s.getNoPersons(), "noextrabeds" : util.getIntField(s.getNoExtraBeds()),
                    "nochildren" : util.getIntField(s.getNoChildren()),"perperson" : s.isPerperson(),
                    "vatname" : util.getVatName(s.getAttr("vat"))} )
       
    var["JLIST_MAP"] = { "services" : list}
        
def _notverifyService(var):
   nop = var["noperson"]
   if nop <= 0 : 
     var["JERROR_noperson"] = M("NOPERSONGREATERZERO")
     return True