diff --git a/cfg/Fertigungsarten.cfg b/cfg/Fertigungsarten.cfg index c0f3fb2..c151ce7 100644 --- a/cfg/Fertigungsarten.cfg +++ b/cfg/Fertigungsarten.cfg @@ -18,7 +18,7 @@ SW - schweißen=schweißen BI - biegen DR - drehen FR - fräsen -LW - laser-/wasserstrahlschneiden +LW - laser- und wasserstrahlschneiden ST - stanzen SA - sägen diff --git a/lib/caditem.py b/lib/caditem.py index 30f0baf..7c4be6a 100644 --- a/lib/caditem.py +++ b/lib/caditem.py @@ -1815,10 +1815,12 @@ class GuiLogic(): # Werte der Combobox setzen if pdm_kategorie_neu == "Baugruppe": cblist = self._config.Fertigung.get_list_in_section("FertigungsartenBaugruppe") + cblist.insert(0, '') ret['cb_fertigungsart_neu'] = cblist elif pdm_kategorie_neu == "Einzelteil": cblist = self._config.Fertigung.get_list_in_section("Fertigungsarten") + cblist.insert(0, '') ret['cb_fertigungsart_neu'] = cblist else: ret['cb_fertigungsart_neu'] = '' diff --git a/lib/gui.py b/lib/gui.py index 644df61..96290c7 100644 --- a/lib/gui.py +++ b/lib/gui.py @@ -598,7 +598,6 @@ class RightFrameBezeichnung(AllFrames): text = self.bezeichnung1_neu.get() if len(text) < 45: self.bezeichnung1_neu_entry.configure(foreground='black') - self._controller.set_gui_data("bezeichnung1_neu", text) elif len(text) < 51: self.bezeichnung1_neu_entry.configure(foreground='orange') else: @@ -1718,7 +1717,7 @@ class App(): style.theme_use('clam') # gesamtes Fenster durch Scrollbar, aber auch mit Mausrad verschieben - self._root.bind('', self.OnMouseWheel) + #self._root.bind('', self.OnMouseWheel) container = ttk.Frame(self._root) container.pack() diff --git a/lib/update_database.py b/lib/update_database.py index 02619d9..33b1e93 100644 --- a/lib/update_database.py +++ b/lib/update_database.py @@ -82,7 +82,7 @@ def get_sivas_dbase(sivas_id, out_dir): print(f"Can't execute SIVAS-database query. Check VPN connection and check the path of %SIVAS_DATABASE_QUERY% in cremig_setenv.bat") return False -def get_sivas_teilestamm(sivas_ids, out_dir): +def get_sivas_teilestamm(sivas_ids, out_dir, overwrite=True): """call the sivas exe for getting all csv files with the item data for the given sivas ids""" sivas_teilestamm_exe = os.environ.get('SIVAS_TEILESTAMM') @@ -92,9 +92,13 @@ def get_sivas_teilestamm(sivas_ids, out_dir): ids_to_generate = [] for id in sivas_ids: - id = id.replace(" ", "") - out_file = os.path.join(out_dir, id + ".csv") - if not os.path.isfile(out_file): + id = id.replace(" ", "") + if not overwrite: + out_file = os.path.join(out_dir, id + ".csv") + if not os.path.isfile(out_file): + ids_to_generate.append(id) + continue + else: ids_to_generate.append(id) if not id.isnumeric(): @@ -127,6 +131,7 @@ if __name__ == '__main__': parser.add_argument('-r', '--rd', action='store_true', help='fetch list of existing parts from network drive') parser.add_argument('-b', '--blacklist', action='store_true', help='fetch list of not allowed parts from network drive') parser.add_argument('-t', '--teilestamm', action='store_true', help='fetch teilestamm-data for given partnumbers as csv') + parser.add_argument('-w', '--overwrite', action='store_true', help='vorhandene CSV-Dateien werden nicht erneut aus SIVAS abgefragt') args = parser.parse_args() @@ -138,8 +143,13 @@ if __name__ == '__main__': elif args.sivasid: if args.teilestamm: - get_sivas_teilestamm(args.sivasid, out_dir) + overwrite = args.overwrite + if overwrite: + get_sivas_teilestamm(args.sivasid, out_dir, overwrite = True) + else: + get_sivas_teilestamm(args.sivasid, out_dir, overwrite = False) + else: get_sivas_dbase(args.sivasid, out_dir)