password ristampa etichetta + log

This commit is contained in:
eduar 2026-03-27 09:44:57 +01:00
parent 4a3d6b1bbe
commit 78a5166a5c
3 changed files with 13 additions and 2 deletions

View File

@ -266,7 +266,7 @@ def import_recipes(config, csv_path=None, defaults=None, unsupported_steps=None,
"vision": str(row.get("test_visione_abilitato", defaults["test_visione_abilitato"])).strip().lower() in {"si", "s", "x", "yes", "y", "true", "1"} and "vision" not in ( "vision": str(row.get("test_visione_abilitato", defaults["test_visione_abilitato"])).strip().lower() in {"si", "s", "x", "yes", "y", "true", "1"} and "vision" not in (
unsupported_steps or []), unsupported_steps or []),
"test_freefall_leak": len( "test_freefall_leak": len(
row.get("prova_pervieta_abilitata", defaults["prova_pervieta_abilitata"])) and "test_freefall_leak" not in ( row.get("prova_pervieta_abilitata", defaults.get("prova_pervieta_abilitata", ""))) and "test_freefall_leak" not in (
unsupported_steps or []), unsupported_steps or []),
"leak_1": len( "leak_1": len(
row.get("prova_tenuta_abilitata", defaults["prova_tenuta_abilitata"])) and "leak_1" not in ( row.get("prova_tenuta_abilitata", defaults["prova_tenuta_abilitata"])) and "leak_1" not in (

View File

@ -322,7 +322,17 @@ try:
self.main_window.centralWidget().set_recipe_mode_barcode() self.main_window.centralWidget().set_recipe_mode_barcode()
def reprint_label(self): def reprint_label(self):
self.main_window.centralWidget().reprint_label() password, ok = QInputDialog.getText(
self.main_window,
"Ristampa etichetta",
"Inserisci la password:",
QLineEdit.Password
)
if ok and password == "neodev123":
self.main_window.centralWidget().reprint_label()
elif ok:
QMessageBox.warning(self.main_window, "Errore", "Password non valida")
def tag_write(self): def tag_write(self):
if isinstance(self.main_window.centralWidget().centralWidget.widget, Barcode_Recipe_Selection): if isinstance(self.main_window.centralWidget().centralWidget.widget, Barcode_Recipe_Selection):

View File

@ -347,6 +347,7 @@ class Test(Widget):
self.components["pipe_cutter"].start_cutting() self.components["pipe_cutter"].start_cutting()
def reprint_label(self): def reprint_label(self):
self.log.info(f"Reprinting label: format={self.print_step.spec.get('template', 'EtichettaR5')}, text={self.last_label}")
self.print(self.last_label, self.print_step.spec.get("template", "EtichettaR5")) self.print(self.last_label, self.print_step.spec.get("template", "EtichettaR5"))
def fail_cycle(self): def fail_cycle(self):