From 44476afdac8d09cae7b3e12d2f3794101d707d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric?= <35066297+c3do@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:35:04 +0200 Subject: [PATCH] FIX: No pricing rule on new clean installation There is no pricing rule on new fresh installation of Dolibarr. I think the pricing rule "PRODUCT_PRICE_UNIQ" should be set by default because it is needed to update a product through API REST. --- htdocs/core/modules/modProduct.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index da2ac06dcea..a3e3e539468 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -85,6 +85,13 @@ class modProduct extends DolibarrModules $this->const[$r][3] = 'Module to control product codes'; $this->const[$r][4] = 0; $r++; + + $this->const[$r][0] = "PRODUCT_PRICE_UNIQ"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "1"; + $this->const[$r][3] = 'pricing rule by default'; + $this->const[$r][4] = 0; + $r++; /*$this->const[$r][0] = "PRODUCT_ADDON_PDF"; $this->const[$r][1] = "chaine";