From e818bf732d5359ab593323b24d42b824b913146b Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Mon, 1 Sep 2025 19:55:00 +0200 Subject: [PATCH 1/9] FIX extra field list depend on parent list when editing a card (#35165) --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b81688307b9..dc5b3f72aad 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7693,7 +7693,7 @@ abstract class CommonObject $("#"+child_list).hide(); //Show mother lists } else if ($("#"+parent_list).val() != 0){ - $("#"+parent_list).show(); + showOptions'.$type.'(child_list, parent_list, orig_select[child_list]); } //Show the child list if the parent list value is selected $("select[name=\""+parent_list+"\"]").click(function() { From 41e914f9ac7571cbedd5da163aac78c2b6ae94d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Sep 2025 18:37:01 +0200 Subject: [PATCH 2/9] fix CI v19 (#35413) * fix CI v19 * Update ProductCombination.class.php * Update combinations.php * Update combinations.php * Update actions_massactions.inc.php --- htdocs/core/actions_massactions.inc.php | 3 ++- htdocs/variants/class/ProductCombination.class.php | 6 ++++-- htdocs/variants/combinations.php | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 13823992335..e7637b68f75 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1291,7 +1291,8 @@ if (!$error && ($action == 'updateprice' && $confirm == 'yes') && $permissiontoa setEventMessages($object->error, $object->errors, 'errors'); } } elseif (getDolGlobalString('PRODUIT_MULTIPRICES')) { - for ($level = 1; $level <= getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); $level++) { + $maxlevel = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); + for ($level = 1; $level <= $maxlevel; $level++) { if ($object->price_base_type == 'TTC') { $newprice = $object->multiprices_ttc[$level] * (100 + $pricepercentage) / 100; $minprice = $object->multiprices_min_ttc[$level]; diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 0fe34d1fec6..3d491325b5f 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -526,7 +526,8 @@ class ProductCombination // MultiPrix if (getDolGlobalString('PRODUIT_MULTIPRICES')) { - for ($i = 1; $i <= getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); $i++) { + $produit_multiprices_limit = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); + for ($i = 1; $i <= $produit_multiprices_limit; $i++) { if ($parent->multiprices[$i] != '' || isset($this->combination_price_levels[$i]->variation_price)) { $new_type = empty($parent->multiprices_base_type[$i]) ? 'HT' : $parent->multiprices_base_type[$i]; $new_min_price = $parent->multiprices_min[$i]; @@ -835,7 +836,8 @@ class ProductCombination // Init price level if (getDolGlobalString('PRODUIT_MULTIPRICES')) { - for ($i = 1; $i <= getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); $i++) { + $produit_multiprices_limit = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); + for ($i = 1; $i <= $produit_multiprices_limit; $i++) { $productCombinationLevel = new ProductCombinationLevel($this->db); $productCombinationLevel->fk_product_attribute_combination = $newcomb->id; $productCombinationLevel->fk_price_level = $i; diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 663a567c31a..04183e8ef60 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -295,7 +295,8 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( if (getDolGlobalString('PRODUIT_MULTIPRICES')) { $prodcomb->combination_price_levels = array(); - for ($i = 1; $i <= getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); $i++) { + $maxi = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); + for ($i = 1; $i <= $maxi; $i++) { $productCombinationLevel = new ProductCombinationLevel($db); $productCombinationLevel->fk_product_attribute_combination = $prodcomb->id; $productCombinationLevel->fk_price_level = $i; @@ -725,7 +726,8 @@ if (!empty($id) || !empty($ref)) { } else { $prodcomb->fetchCombinationPriceLevels(); - for ($i = 1; $i <= getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); $i++) { + $maxi = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); + for ($i = 1; $i <= $maxi; $i++) { $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i; $text = $langs->trans('ImpactOnPriceLevel', $i).' - '.getDolGlobalString($keyforlabel); print ''; From 4e7954b85c1d49c1594df5263ef1af51cf443bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 21 Sep 2025 12:10:43 +0200 Subject: [PATCH 3/9] fix CI v19 (#35414) --- htdocs/product/class/product.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index fb24f95a81b..1fa3bef4db6 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2672,7 +2672,8 @@ class Product extends CommonObject // Load multiprices array if (getDolGlobalString('PRODUIT_MULTIPRICES') && empty($ignore_price_load)) { // prices per segment - for ($i = 1; $i <= getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); $i++) { + $produit_multiprices_limit = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); + for ($i = 1; $i <= $produit_multiprices_limit; $i++) { $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; $sql .= " price_base_type, tva_tx, default_vat_code, tosell, price_by_qty, rowid, recuperableonly"; $sql .= " FROM ".$this->db->prefix()."product_price"; @@ -2782,7 +2783,8 @@ class Product extends CommonObject return -1; } } elseif (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') && empty($ignore_price_load)) { // prices per customer and quantity - for ($i = 1; $i <= getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); $i++) { + $produit_multiprices_limit = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); + for ($i = 1; $i <= $produit_multiprices_limit; $i++) { $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; $sql .= " price_base_type, tva_tx, default_vat_code, tosell, price_by_qty, rowid, recuperableonly"; $sql .= " FROM ".$this->db->prefix()."product_price"; From 92454d671f2d464b63424c9bf90e95bcb3d20762 Mon Sep 17 00:00:00 2001 From: Dylan Bourdere Date: Mon, 22 Sep 2025 12:11:32 +0200 Subject: [PATCH 4/9] rename tab name in comment of modulebuilder (#35431) --- .../template/core/modules/modMyModule.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index b5dfb86dba7..258ff995e96 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -185,13 +185,13 @@ class modMyModule extends DolibarrModules // 'group' to add a tab in group view // 'intervention' to add a tab in intervention view // 'invoice' to add a tab in customer invoice view - // 'invoice_supplier' to add a tab in supplier invoice view + // 'supplier_invoice' to add a tab in supplier invoice view // 'member' to add a tab in fundation member view // 'opensurveypoll' to add a tab in opensurvey poll view // 'order' to add a tab in sale order view - // 'order_supplier' to add a tab in supplier order view + // 'supplier_order' to add a tab in supplier order view // 'payment' to add a tab in payment view - // 'payment_supplier' to add a tab in supplier payment view + // 'supplier_payment' to add a tab in supplier payment view // 'product' to add a tab in product view // 'propal' to add a tab in propal view // 'project' to add a tab in project view From 669c939bcd2b70c5cfad83b8a605fff416e713fc Mon Sep 17 00:00:00 2001 From: Dylan Bourdere Date: Mon, 22 Sep 2025 20:30:47 +0200 Subject: [PATCH 5/9] use getDolGlobalString to avoid getting undefined property (#35436) --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3c87c830fd4..81d90568684 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5836,7 +5836,7 @@ class Facture extends CommonInvoice } // Errors Recipient - $errors_to = $conf->global->MAIN_MAIL_ERRORS_TO; + $errors_to = getDolGlobalString('MAIN_MAIL_ERRORS_TO');; $trackid = 'inv'.$tmpinvoice->id; $sendcontext = 'standard'; From 65a3b0893d4c8aa7bac82c3e2cff0d9d07ccf69f Mon Sep 17 00:00:00 2001 From: Dylan Bourdere Date: Mon, 22 Sep 2025 20:31:50 +0200 Subject: [PATCH 6/9] fix undefined properties (#35435) --- htdocs/core/class/commonobject.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index bf543d32c25..9c8602cb382 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -605,6 +605,10 @@ abstract class CommonObject protected $labelStatus; protected $labelStatusShort; + /** + * @var string output + */ + public $output; /** * @var array List of child tables. To test if we can delete object. From 84ba1852aa1346c7203e4cb814d25745baa02206 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Wed, 24 Sep 2025 15:25:15 +0200 Subject: [PATCH 7/9] Another try to have autoassignement on v18 --- ..._quality_qodana.yml => code_quality_qodana.yml.disabled} | 2 -- .github/workflows/{pr-18.yaml.disabled => pr-18.yaml} | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) rename .github/workflows/{code_quality_qodana.yml => code_quality_qodana.yml.disabled} (94%) rename .github/workflows/{pr-18.yaml.disabled => pr-18.yaml} (92%) diff --git a/.github/workflows/code_quality_qodana.yml b/.github/workflows/code_quality_qodana.yml.disabled similarity index 94% rename from .github/workflows/code_quality_qodana.yml rename to .github/workflows/code_quality_qodana.yml.disabled index cb08ea9b4cd..5ea1093988e 100644 --- a/.github/workflows/code_quality_qodana.yml +++ b/.github/workflows/code_quality_qodana.yml.disabled @@ -3,8 +3,6 @@ on: schedule: - cron: "0 20 * * 1,3,5" workflow_dispatch: - branches: - - develop # push: # branches: # - develop diff --git a/.github/workflows/pr-18.yaml.disabled b/.github/workflows/pr-18.yaml similarity index 92% rename from .github/workflows/pr-18.yaml.disabled rename to .github/workflows/pr-18.yaml index 4f274e28c8f..47fb32ac8ea 100644 --- a/.github/workflows/pr-18.yaml.disabled +++ b/.github/workflows/pr-18.yaml @@ -8,7 +8,7 @@ name: Set reviewer for v18 on: - pull_request: + pull_request_target: types: [opened, synchronize, reopened] branches: - "18.0" @@ -20,10 +20,6 @@ jobs: pr18: runs-on: ubuntu-latest - #env: - # GH_TOKEN: ${{ github.token }} - # GH_TOKENS: ${{ secrets.GITHUB_TOKEN }} - steps: - name: Generate a token id: generate-token From bcf6d6a7a2e0a42ff03672ea524caefe5aa7f93a Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Thu, 25 Sep 2025 11:47:51 +0200 Subject: [PATCH 8/9] FIX api orders : forward database error on failure (backpot commit d9e81cb) (#35478) --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 5c38cbdf51d..eb0b6378d79 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1156,7 +1156,7 @@ class Commande extends CommonOrder } } } else { - dol_print_error($this->db); + $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } From a63eae790384d289ddbeca5c63ed31ed5feb06dd Mon Sep 17 00:00:00 2001 From: Dylan Bourdere Date: Thu, 25 Sep 2025 11:59:09 +0200 Subject: [PATCH 9/9] Fix: property api dir_temp (#35439) * fix undefined property * rename key --- htdocs/core/class/conf.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 7b1188f6f9a..34e1eb8ebd3 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -125,6 +125,7 @@ class Conf public $notification; public $expensereport; public $productbatch; + public $api; @@ -257,6 +258,7 @@ class Conf $this->notification = new stdClass(); $this->expensereport = new stdClass(); $this->productbatch = new stdClass(); + $this->api = new stdClass(); // Common arrays $this->cache = array(); @@ -504,6 +506,10 @@ class Conf $this->admin->dir_output = $rootfordata.'/admin'; $this->admin->dir_temp = $rootfortemp.'/admin/temp'; + // For api storage + $this->api->dir_output = $rootfordata.'/api'; + $this->api->dir_temp = $rootfortemp.'/api/temp'; + // For user storage $this->user->multidir_output = array($this->entity => $rootfordata."/users"); $this->user->multidir_temp = array($this->entity => $rootfortemp."/users/temp");