Merge pull request #25838 from mc2rcanarslan/fix_product_sql_error

fix: missing space in generated product sql
This commit is contained in:
Laurent Destailleur 2023-09-08 10:57:15 +02:00 committed by GitHub
commit 0914bc5c63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2817,7 +2817,7 @@ class Product extends CommonObject
$sql .= " FROM ".$this->db->prefix()."mrp_mo as c";
$sql .= " INNER JOIN ".$this->db->prefix()."mrp_production as mp ON mp.fk_mo=c.rowid";
if (empty($user->rights->societe->client->voir) && !$socid) {
$sql .= "INNER JOIN ".$this->db->prefix()."societe_commerciaux as sc ON sc.fk_soc=c.fk_soc AND sc.fk_user = ".((int) $user->id);
$sql .= " INNER JOIN ".$this->db->prefix()."societe_commerciaux as sc ON sc.fk_soc=c.fk_soc AND sc.fk_user = ".((int) $user->id);
}
$sql .= " WHERE ";
$sql .= " c.entity IN (".getEntity('mo').")";