コード例 #1
0
    def refresh(self):
        # Aggiornamento TreeView
        idAzienda = self._anagrafica._idAzienda
        denominazione = prepareFilterString(self.denominazione_filter_entry.get_text())
        indirizzo = prepareFilterString(self.indirizzo_filter_entry.get_text())

        def filterCountClosure():
            return AccountEmail().count(idAzienda=idAzienda, denominazione=denominazione, indirizzo=indirizzo)

        self._filterCountClosure = filterCountClosure

        self.numRecords = self.countFilterResults()

        self._refreshPageCount()

        # Let's save the current search as a closure
        def filterClosure(offset, batchSize):
            return AccountEmail().select(
                orderBy=self.orderBy,
                idAzienda=idAzienda,
                denominazione=denominazione,
                indirizzo=indirizzo,
                offset=offset,
                batchSize=batchSize,
            )

        self._filterClosure = filterClosure

        daos = self.runFilter()

        self._treeViewModel.clear()

        for dao in daos:
            self._treeViewModel.append((dao, (dao.denominazione), (dao.indirizzo or ""), (dao.preferito or False)))
コード例 #2
0
    def refresh(self):
        # Aggiornamento TreeView
        idAzienda = self._anagrafica._idAzienda
        numero_conto = prepareFilterString(
                self.numero_conto_filter_entry.get_text())

        def filterCountClosure():
            return BancheAzienda().count(idAzienda=idAzienda,
                                           numeroConto=numero_conto)

        self._filterCountClosure = filterCountClosure

        self.numRecords = self.countFilterResults()

        self._refreshPageCount()

        # Let's save the current search as a closure
        def filterClosure(offset, batchSize):
            return BancheAzienda().select(orderBy=self.orderBy,
                                          idAzienda=idAzienda,
                                          numeroConto=numero_conto,
                                          offset=offset,
                                          batchSize=batchSize)

        self._filterClosure = filterClosure

        daos = self.runFilter()

        self._treeViewModel.clear()

        for dao in daos:
            self._treeViewModel.append((dao,
                                        (dao.denominazione_banca),
                                        (dao.numero_conto or ''),
                                        (dateToString(dao.data_riporto) or ''),
                                        (str(dao.valore_riporto) or ''),
                                        (dao.codice_sia or ''),
                                        (dao.banca_predefinita or False)))
コード例 #3
0
    def refresh(self):
        # Aggiornamento TreeView
        denominazione = prepareFilterString(
            self.filter.denominazione_filter_entry.get_text())
        agenzia = prepareFilterString(
            self.filter.agenzia_filter_entry.get_text())
        iban = prepareFilterString(self.filter.iban_filter_entry.get_text())
        abi = prepareFilterString(self.filter.abi_filter_entry.get_text())
        cab = prepareFilterString(self.filter.cab_filter_entry.get_text())
        bic_swift = prepareFilterString(
            self.filter.bic_swift_filter_entry.get_text())
        self.numRecords = Banca().count(denominazione=denominazione,
                                                    agenzia=agenzia,
                                                    iban=iban,
                                                    abi=abi,
                                                    cab=cab,
                                                    bic_swift=bic_swift)
        self._refreshPageCount()

        # Let's save the current search as a closure
        def filterClosure(offset, batchSize):
            return Banca().select(denominazione=denominazione,
                                            agenzia=agenzia,
                                            iban=iban,
                                            abi=abi,
                                            cab=cab,
                                            bic_swift=bic_swift,
                                            orderBy=self.orderBy,
                                            offset=self.offset,
                                            batchSize=self.batchSize)

        self._filterClosure = filterClosure

        bans = self.runFilter()

        self._treeViewModel.clear()

        for b in bans:
            self._treeViewModel.append((b,
                                        (b.denominazione or ''),
                                        (b.agenzia or ''),
                                        (b.iban or ''),
                                        (b.abi or ''),
                                        (b.cab or ''),
                                        (b.bic_swift or '')))
コード例 #4
0
    def refresh(self):
        # Aggiornamento TreeView
        codice = prepareFilterString(self.codice_filter_entry.get_text())
        ragioneSociale = prepareFilterString(self.ragione_sociale_filter_entry.get_text())
        #insegna = prepareFilterString(self.insegna_filter_entry.get_text())
        cognomeNome = prepareFilterString(self.cognome_nome_filter_entry.get_text())
        localita = prepareFilterString(self.localita_filter_entry.get_text())
        partitaIva = prepareFilterString(self.partita_iva_filter_entry.get_text())
        codiceFiscale = prepareFilterString(self.codice_fiscale_filter_entry.get_text())
        #idCategoria = findIdFromCombobox(self.id_categoria_cliente_filter_combobox)
        role = Role().select(name=self.tipo_dao)
        if role:
            idRole= role[0].id
        self.numRecords = AnagraficaSecondaria_().count(codice=codice,
                                                    ragioneSociale=ragioneSociale,
                                                    cognomeNome=cognomeNome,
                                                    idRole=idRole,
                                                    localita=localita,
                                                    partitaIva=partitaIva,
                                                    codiceFiscale=codiceFiscale,
                                                    )

        self._refreshPageCount()

        clis = AnagraficaSecondaria_().select(orderBy=self.orderBy,
                                            codice=codice,
                                            ragioneSociale=ragioneSociale,
                                            cognomeNome=cognomeNome,
                                            localita=localita,
                                            idRole=idRole,
                                            partitaIva=partitaIva,
                                            codiceFiscale=codiceFiscale,
                                            offset=self.offset,
                                            batchSize=self.batchSize)

        model = gtk.ListStore(object, str, str, str, str)

        for c in clis:
            model.append((c,
                          (c.codice or ''),
                          (c.ragione_sociale or ''),
                          (c.cognome or '') + ' ' + (c.nome or ''),
                          (c.sede_operativa_localita or '')))

        self._ricerca.ricerca_filter_treeview.set_model(model)
コード例 #5
0
    def refresh(self):
        # Aggiornamento TreeView
        denominazione = prepareFilterString(self.denominazione_filter_entry.get_text())
        pagamento = Pagamento()
        def filterCountClosure():
            return pagamento.count(denominazione=denominazione)

        self._filterCountClosure = filterCountClosure

        self.numRecords = self.countFilterResults()

        self._refreshPageCount()

        # Let's save the current search as a closure
        def filterClosure(offset, batchSize):
            return pagamento.select(orderBy=self.orderBy,
                                denominazione=denominazione,
                                offset=offset,
                                batchSize=batchSize)

        self._filterClosure = filterClosure

        pagamenti = self.runFilter()

        self._treeViewModel.clear()

        for p in pagamenti:
            self._treeViewModel.append((p,
                                        (p.denominazione or ''),
                                        (p.tipo or ''),
                                        str(mN(p.spese, 2)),
                                        str(p.aliquota_iva),
                                        (p.codice or '')
                                        ))

        self._anagrafica.anagrafica_filter_treeview.set_model(self._treeViewModel)