Stückliste für Fertigungsteil nicht erstellbar

Hallo,
ich fange gerade an, mit Dolibarr zu arbeiten. Es ist wirklich gut gemacht und sehr umfangreich. Ich bin auf folgendes Problem gestoßen:

Es lassen sich gerade für meine Fertigungsteile keine Stücklisten erstellen.

Beim Produkt steht im Feld Standardstückliste: Error forging a SQL request from an universal criteria: Bad syntax of the search string, filter criteria is inhalited.

Bei der Stücklistenerstellung lassen sich gerade die als Eigenprodukte gekenzeichneten Produkte nicht als zu erstellende Produkte auswählen, gerade sie fehlen in der Liste.

Ist da in der Datenbank etwas falsch konfiguriert?

Danke und Grüße an das Forum,
Frederic

Hallo @Frederic,

Kannst du bitte noch folgende Informationen geben damit wir besser helfen können:

  1. Welche Dolibarr Version verwendest du?
  2. Du verwendest das Dolibarr interne Modul für die Stücklisten, oder?
  3. Kannst du einen Screenshot machen von dem Fehler? Dann ist klarer wo genau dieser auftritt.
  4. Kannst du den Auszug aus den Dolibarr Logs und falls es Fehlermeldungen im Webserver Log gibt (z.B. Apache2) dann am besten auch diese bereitstellen?

Gruß Sven

Hallo Sven,

danke für die schnelle Antwort

  1. Dolibarr 17.0.0
  2. ja
  3. füge ich unten an
  4. wo finde ich die Dolibarr-Logs? Die Logdateien vom Apache2-Server (error.log, access.log) sind leer

Grüße,
Frederic

Hi @Frederic,

für das Dolibarr Log muss das entsprechende Modul unter Start → Einstellungen → Module → „Debug Logs“ aktiviert sein. Wenn du dort auf die Einstellungen gehst, dann kann über einen Link „Download dolibarr.log“ das Log heruntergeladen werden. Bevor du das Log hochlädst, schau bitte nochmal drüber ob keine sensitiven Infos wie Passwörter oder so reingeschrieben wurden.

Verwendest du irgendwelche Module aus dem Dolistore oder sonst woher? Kannst du diese mal deaktivieren und probieren ob es damit geht?
Kannst du auf die Neueste Version 17.0.2 upgraden? Ggf. könnte es damit behoben sein, allerdings konnte ich zumindest zu dem Fehler keinen Bug finden.

Insgesamt leider schwer zu beurteilen woran es liegen kann, da die genaue Datenkonstellation nicht bekannt ist.

Gruß Sven

Hi Sven,

ich habe die Funktion aktiviert und etwas mit den Stücklisten gearbeitet. Dabei ist mir aufgefallen, daß Einträge sich nicht löschen oder umsortieren lassen. Es kommt zwar die Meldung, der Datensatz werde gelöscht, er steht aber immer noch in der Liste.

2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET position = 1 WHERE rowid = 67
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:06 ERR     192.168.178.24  Error url=/core/ajax/row.php, query_string=, sql=UPDATE llx_bom_bomline SET position = 1 WHERE rowid = 67, db_error=ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET position = 2 WHERE rowid = 68
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:06 ERR     192.168.178.24  Error url=/core/ajax/row.php, query_string=, sql=UPDATE llx_bom_bomline SET position = 2 WHERE rowid = 68, db_error=ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET position = 3 WHERE rowid = 75
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:06 ERR     192.168.178.24  Error url=/core/ajax/row.php, query_string=, sql=UPDATE llx_bom_bomline SET position = 3 WHERE rowid = 75, db_error=ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET position = 4 WHERE rowid = 69
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:06 ERR     192.168.178.24  Error url=/core/ajax/row.php, query_string=, sql=UPDATE llx_bom_bomline SET position = 4 WHERE rowid = 69, db_error=ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET position = 5 WHERE rowid = 70
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:06 ERR     192.168.178.24  Error url=/core/ajax/row.php, query_string=, sql=UPDATE llx_bom_bomline SET position = 5 WHERE rowid = 70, db_error=ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET position = 6 WHERE rowid = 71
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:06 ERR     192.168.178.24  Error url=/core/ajax/row.php, query_string=, sql=UPDATE llx_bom_bomline SET position = 6 WHERE rowid = 71, db_error=ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET position = 7 WHERE rowid = 72
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:06 ERR     192.168.178.24  Error url=/core/ajax/row.php, query_string=, sql=UPDATE llx_bom_bomline SET position = 7 WHERE rowid = 72, db_error=ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET position = 8 WHERE rowid = 73
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:06 ERR     192.168.178.24  Error url=/core/ajax/row.php, query_string=, sql=UPDATE llx_bom_bomline SET position = 8 WHERE rowid = 73, db_error=ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET position = 9 WHERE rowid = 74
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:06 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:06 ERR     192.168.178.24  Error url=/core/ajax/row.php, query_string=, sql=UPDATE llx_bom_bomline SET position = 9 WHERE rowid = 74, db_error=ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548
2023-06-29 13:47:10 ERR     192.168.178.24    DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET fk_bom=7, fk_product=29, fk_bom_child=NULL, description=NULL, qty=1, qty_frozen=0, disable_stock_change=0, efficiency=1, fk_unit=NULL, position=3, import_key=NULL WHERE rowid=70
2023-06-29 13:47:10 ERR     192.168.178.24    DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:10 ERR     192.168.178.24    DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:41 ERR     192.168.178.24    DoliDBPgsql::query SQL Error query: UPDATE llx_bom_bomline SET fk_bom=7, fk_product=21, fk_bom_child=NULL, description=NULL, qty=0, qty_frozen=0, disable_stock_change=0, efficiency=1, fk_unit=NULL, position=3, import_key=NULL WHERE rowid=69
2023-06-29 13:47:41 ERR     192.168.178.24    DoliDBPgsql::query SQL Error message: ERROR:  42703: record "new" has no field "tms"
CONTEXT:  PL/pgSQL assignment "NEW.tms = now()"
PL/pgSQL function update_modified_column_tms() line 1 at assignment
LOCATION:  plpgsql_exec_get_datum_type_info, pl_exec.c:5548 (DB_ERROR_NOSUCHFIELD)
2023-06-29 13:47:41 ERR     192.168.178.24    DoliDBPgsql::query SQL Error usesavepoint = 0
2023-06-29 13:47:41 ERR     192.168.178.24   BOM::addLine error=
2023-06-29 13:48:05 ERR     192.168.178.24  DoliDBPgsql::query SQL Error query: SELECT u.rowid, u.firstname, u.lastname, u.birth as datea, 'birth' as typea, u.email, u.statut as status FROM llx_user as u WHERE u.entity IN (0,1) AND u.statut = 1 AND  date_format( u.birth, '%c') = '6' UNION SELECT u.rowid, u.firstname, u.lastname, u.dateemployment as datea, 'employment' as typea, u.email, u.statut as status FROM llx_user as u WHERE u.entity IN (0,1) AND u.statut = 1 AND  date_format( u.dateemployment, '%c') = '6' ORDER BY DAY(datea) ASC
2023-06-29 13:48:05 ERR     192.168.178.24  DoliDBPgsql::query SQL Error message: ERROR:  0A000: invalid UNION/INTERSECT/EXCEPT ORDER BY clause
LINE 1: ...te_format( u.dateemployment, '%c') = '6' ORDER BY DAY(datea)...
                                                             ^
DETAIL:  Only result column names can be used, not expressions or functions.
HINT:  Add the expression/function to every SELECT, or move the UNION into a FROM clause.
LOCATION:  transformSetOperationStmt, analyze.c:1808 (DB_ERROR_ERROR:  0A000: invalid UNION/INTERSECT/EXCEPT ORDER BY clause
LINE 1: ...te_format( u.dateemployment, '%c') = '6' ORDER BY DAY(datea)...
                                                             ^
DETAIL:  Only result column names can be used, not expressions or functions.
HINT:  Add the expression/function to every SELECT, or move the UNION into a FROM clause.
LOCATION:  transformSetOperationStmt, analyze.c:1808)
2023-06-29 13:48:05 ERR     192.168.178.24  DoliDBPgsql::query SQL Error usesavepoint = 0

Man kann Stücklisten erstellen, wenn man das Attribut Produktart entfernt und hinterher wieder setzt, die Fehlermeldung „Error forging a SQL request…“ (siehe oben) bleibt aber.

Welche Informationen über mein System könnten noch hilfreich sein?

Grüße,
Ernst

Hallo Ernst,

ich glaube die Informationen die du gesendet hast, reichen aus. Wenn ich das richtig sehe, dann verwendest du eine Postgresql. Dem Fehler in den Logs nach versucht die Datenbank Funktion update_modified_column_tms() auf das Feld tms zuzugreifen, aber die Tabelle llx_bom_bomline hat kein solches Feld. Auch in einer neueren Version von 17.0.x tritt dieser Fehler auf. Ich bitte dich dafür einen Fehler bei Github einzustellen, damit dieses Problem dauerhaft gefixt werden kann. Bitte hier auf Issues · Dolibarr/dolibarr · GitHub gehen und dann auf „New issue“ und dann Bug Report auswählen.
Das Problem ist, dass ein Trigger für diese Tabelle definiert wird (siehe dolibarr/htdocs/install/pgsql/functions/functions.sql at 17.0 · Dolibarr/dolibarr · GitHub) obwohl kein tms Feld vorhanden ist.

Als Workaround müsste es funktionieren wenn du den Trigger erstmal manuell entfernst. Das müsste mit folgendem Datenbank Befehl funktionieren:

DROP TRIGGER update_customer_modtime ON llx_bom_bomline;

Gruß Sven