def buildUI(self): self.window.title = 'Generacion de Recibo' v1 = VBox(parent=self.window, expand=True, fill=True) h0 = HBox(parent=v1, expand=False, fill=True) v0left = VBox(parent=h0, expand=False, fill=True) v0right = VBox(parent=h0, expand=False, fill=True) v2 = VBox(parent=v1) actionContainer = HBox(parent=v1, expand=False, fill=True) Label(parent=v0left, text='Cuenta Contable:') columns= (Column(name='Cod', attribute='code'), Column(name='Nombre', attribute='name', operator=Qualifier.like),) self.category = SearchEntry(parent=v0right, columns=columns, searcher=self.trans, cls=MovementAccount) Label(parent=v0left, text='Cliente:') columns = (Column(name='Nombre', attribute='person.name', operator=Qualifier.like), Column(name='Apellido', attribute='person.surname', operator=Qualifier.like),) self.otherParty = SearchEntry(parent=v0right, cls=Client, searcher=self.trans, columns=columns) Label(parent=v0left, text='Numero:') self.docNumber = Entry(parent=v0right) Label(parent=v0left, text='Fecha:') self.actualDate = Entry(parent=v0right,emptyValue=now()) self.actualDate.commitValue(self.actualDate.value) Label(parent=v0left, text='Monto:') self.amount = Entry(parent=v0right) Label(parent=v2, text='Concepto:', expand=False, fill=False) self.concept = MultiLine(parent=v2) save = Button(parent=actionContainer, label='Guardar', onAction=self.save) discard = Button(parent=actionContainer, label='Descartar', onAction=self.discard)
def buildUI(self): self.window.title = 'Caja chica - Carga' v = VBox(parent=self.window) f0 = Frame(parent=v, label='Cuenta') h0 = HBox(parent=f0) right0 = VBox(parent=h0) columns = (Column(name='Nombre', attribute='name', operator=Qualifier.like), ) self.account = SearchEntry(parent=right0, columns=columns, searcher=self.trans, cls=CustomerAccount) f1 = Frame(parent=v, label='Operacion') h1 = HBox(parent=f1) left1 = VBox(parent=h1) right1 = VBox(parent=h1) # Label(parent=left1, text='Fecha') # fecha = Entry(parent=right1) Label(parent=left1, text='Categoria') columns = ( Column(name='Cod', attribute='code'), Column(name='Nombre', attribute='name', operator=Qualifier.like), ) self.category = SearchEntry(parent=right1, columns=columns, searcher=self.trans, cls=MovementAccount) f2 = Frame(parent=v, label='Comprobante') h2 = HBox(parent=f2) left2 = VBox(parent=h2) right2 = VBox(parent=h2) Label(parent=left2, text='Tipo') columns = (Column(name='Nombre', attribute='name', operator=Qualifier.like), ) self.docType = SearchEntry(parent=right2, columns=columns, searcher=DocumentType, onAction=self.setThirdLabel) Label(parent=left2, text='Numero') self.docNumber = Entry(parent=right2) Label(parent=left2, text='Fecha') self.docDate = Entry(parent=right2, emptyValue=now()) self.docDate.commitValue(self.docDate.value) self.thirdLabel = Label(parent=left2) columns = (Column(name='Apellido', attribute='person.surname', operator=Qualifier.like), ) self.otherParty = SearchEntry(parent=right2, columns=columns, searcher=self.trans) self.otherParty.disable() # f3 = Frame(parent=v, label='Montos') h3 = HBox(parent=v) # Label(parent=h3, text='Ingreso') # self.moneyIn = Entry(parent=h3) # Label(parent=h3, text='Egreso') # self.moneyOut = Entry(parent=h3) Label(parent=h3, text='Monto') self.amount = Entry(parent=h3) Label(parent=h3, text='Descripcion') self.description = Entry(parent=h3) h4 = HBox(parent=v) Button(parent=h4, label='Guardar', onAction=self.save) Button(parent=h4, label='Descartar')