Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX #21294 Stock import sql query #32542

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

Al-thi
Copy link
Contributor

@Al-thi Al-thi commented Jan 6, 2025

FIX #21294 Import stock fails

To respect the PostgreSQL update statement syntax, cf. https://www.postgresql.org/docs/17/sql-update.html

column_name
    The name of a column in the table named by table_name. The column name can
    be qualified with a subfield name or array subscript, if needed. Do not
    include the table's name in the specification of a target column — for
    example, UPDATE table_name SET table_name.col = 1 is invalid.

To respect the PostgreSQL update statement syntax, cf.
https://www.postgresql.org/docs/17/sql-update.html

```
column_name
    The name of a column in the table named by table_name. The column name can
    be qualified with a subfield name or array subscript, if needed. Do not
    include the table's name in the specification of a target column — for
    example, UPDATE table_name SET table_name.col = 1 is invalid.
```

Signed-off-by: Alexis Thietard <[email protected]>
Copy link
Contributor

@rycks rycks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for me, checked with mysql too, there is no impact

UPDATE llx_product as p SET stock = (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid)

@lvessiller-opendsi lvessiller-opendsi self-requested a review January 9, 2025 08:52
@eldy eldy merged commit a46c47c into Dolibarr:18.0 Jan 13, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants