def on_test_promowear_button_clicked(self, button): msg = _( """PROVIAMO IL MODULO DI TAGLIA E COLORE o PROMOWEAR, Procedo? """ ) if not YesNoDialog(msg=msg, transient=self.getTopLevel()): return from data.createSchemaDb import orderedInstallPromoWear if orderedInstallPromoWear(): if not setconf("PromoWear","mod_enable",value="yes"): a = SetConf() a.section = "PromoWear" a.tipo_section ="Modulo" a.description = "Modulo Taglia e colore" a.tipo = "bool" a.key = "mod_enable" a.value = "yes" a.persist() messageInfo(msg=_("RIAVVIA IL PROMOGEST")) Environment.delete_pickle() Environment.restart_program()
def on_test_promoshop_button_clicked(self, button): from promogest.dao.Setconf import SetConf msg = _(""" PROVIAMO IL MODULO VENDITA DETTAGLIO o PROMOSHOP, Procedo? """) if not YesNoDialog(msg=msg, transient=self.getTopLevel()): return if not setconf("VenditaDettaglio","mod_enable",value="yes"): a = SetConf() a.section = "VenditaDettaglio" a.tipo_section ="Modulo" a.description = "Modulo Vendita Dettaglio" a.tipo = "bool" a.key = "mod_enable" a.value = "yes" a.persist() a = SetConf() a.section = "VenditaDettaglio" a.tipo_section ="Modulo" a.description = "Nome del movimento generato" a.tipo = "str" a.key = "operazione" a.value = "Scarico venduto da cassa" a.persist() a = SetConf() a.section = "VenditaDettaglio" a.tipo_section ="Modulo" a.description = "disabilita_stampa" a.tipo = "bool" a.key = "disabilita_stampa" a.value = "True" a.active = True a.persist() from data.createSchemaDb import orderedInstallVenditaDettaglio orderedInstallVenditaDettaglio() messageInfo(msg=_("RIAVVIA IL PROMOGEST")) Environment.delete_pickle() Environment.restart_program() else: messageInfo(msg=_("RISULTA GIA' ATTIVATO"))