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
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
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)
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
def getVatName(vat): list = cutil.getDict("vat") vat = findElemInSeq(vat,list) if vat == None : return "" return vat.getDescription()
def getVatName(vat): list = cutil.getDict("vat") vat = findElemInSeq(vat, list) if vat == None: return "" return vat.getDescription()
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")) })
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