fix for printer not saved in the recipe import/export

This commit is contained in:
edo-neo 2025-11-10 09:36:15 +01:00
parent 44b2220b84
commit 847ee11ca9
2 changed files with 3 additions and 1 deletions

View File

@ -436,8 +436,9 @@ def export_recipes(config, csv_path=None, logger=None):
exportable.update({
"stampa_etichetta_abilitata": "x",
print_template_field: steps["print"].spec["template"],
"printer_selection": steps["print"].spec.get("printer_selection", (config.get("label_printer", {}) or {}).get("printer", "")),
})
fieldnames.update(["stampa_etichetta_abilitata", print_template_field])
fieldnames.update(["stampa_etichetta_abilitata", print_template_field, "printer_selection"])
# Append the exportable row to the data
data.append(exportable)

View File

@ -539,6 +539,7 @@ class Recipe_Selection(Widget):
"labeltxt_3",
"labeltxt_4",
"labeltxt_5",
"printer_selection",
]
# Get the selected recipe IDs if we're exporting only selected recipes