From 2aa3995b73d808fd4a325000d312e2f95c4ec26b Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 21 Aug 2014 06:01:47 +0200 Subject: [PATCH 1/8] Fix :: Sql problem for fresh install on resource table // Ok in migration script --- htdocs/install/mysql/tables/llx_c_type_resource.key.sql | 2 +- htdocs/install/mysql/tables/llx_c_type_resource.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_c_type_resource.key.sql b/htdocs/install/mysql/tables/llx_c_type_resource.key.sql index 5a76ff0cfa6..dc5c5ee150a 100644 --- a/htdocs/install/mysql/tables/llx_c_type_resource.key.sql +++ b/htdocs/install/mysql/tables/llx_c_type_resource.key.sql @@ -17,5 +17,5 @@ -- ======================================================================== -ALTER TABLE llx_c_type_contact ADD UNIQUE INDEX uk_c_type_contact_id (element, source, code); +ALTER TABLE llx_c_type_resource ADD UNIQUE INDEX uk_c_type_resource_id (label, code); diff --git a/htdocs/install/mysql/tables/llx_c_type_resource.sql b/htdocs/install/mysql/tables/llx_c_type_resource.sql index efb505ba574..8ba088c075e 100644 --- a/htdocs/install/mysql/tables/llx_c_type_resource.sql +++ b/htdocs/install/mysql/tables/llx_c_type_resource.sql @@ -29,6 +29,6 @@ create table llx_c_type_resource ( rowid integer PRIMARY KEY, code varchar(32) NOT NULL, - libelle varchar(64) NOT NULL, + label varchar(64) NOT NULL, active tinyint DEFAULT 1 NOT NULL )ENGINE=innodb; From b7daef10c6f7c4c1ae3fbf2a86bd6797f932a423 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 26 Aug 2014 04:35:22 +0200 Subject: [PATCH 2/8] Fix llx_c_type_resource when you update from a 3.6-beta --- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 919fbee7d4d..0e7a226d0bd 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -293,6 +293,9 @@ create table llx_c_type_resource active tinyint DEFAULT 1 NOT NULL )ENGINE=innodb; +-- Fix llx_c_type_resource when you update from a 3.6-beta +ALTER TABLE llx_c_type_resource CHANGE libelle label VARCHAR(64) NOT NULL; + ALTER TABLE llx_c_type_resource ADD UNIQUE INDEX uk_c_type_resource_id (label, code); -- Fix :: account_parent must be an int, not an account number From 12c67529712d924f16989b92f421ec4d0fe89485 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 Aug 2014 23:45:02 +0200 Subject: [PATCH 3/8] Fix: Can upload files on services. --- ChangeLog | 4 ++++ htdocs/product/document.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d6ba26267a6..1cf11ece40a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 3.6.1 compared to 3.6.* ***** +For users: +- Fix: Can upload files on services. + ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: - New: Update ckeditor to version 4. diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 3e5417ae9e8..1e8c7b7cd9a 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -141,7 +141,7 @@ if ($object->id) print ''; $modulepart = 'produit'; - $permission = $user->rights->produit->creer; + $permission = (($object->type == 0 && $user->rights->produit->creer) || ($object->type == 1 && $user->rights->service->creer)); $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; } From 4405f17f2280395c83260911b439b808a2b2a437 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 Aug 2014 23:47:44 +0200 Subject: [PATCH 4/8] Update changelog --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1cf11ece40a..f92c959db50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.6.1 compared to 3.6.* ***** For users: - Fix: Can upload files on services. +- Fix: sql errors on updat fichinter +- Fix: debian script syntax error +- Fix: error "menu param is not inside list" into pos module. ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: From 0674667932a71965b8ffa25d71a6edffac916109 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 27 Aug 2014 10:44:40 +0200 Subject: [PATCH 5/8] Fix: error with php strict mode --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 2667e328e58..ed255b5785f 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1206,7 +1206,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,(empty($user->societe_id)?0:1),'eldy',$tabMenu); // We update newmenu for special dynamic menus - if ($user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account + if (!empty($user->rights->banque->lire) && $mainmenu == 'bank') // Entry for each bank account { $sql = "SELECT rowid, label, courant, rappro, courant"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; From 61ae2f3f37fab514d8c355f6d08c565a13f71010 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 27 Aug 2014 11:34:24 +0200 Subject: [PATCH 6/8] fix : missing translation --- htdocs/langs/en_US/products.lang | 3 ++- htdocs/product/class/product.class.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 684ee5ef20a..1e3027acd25 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -80,11 +80,12 @@ ContractStatusClosed=Closed ContractStatusRunning=Running ContractStatusExpired=expired ContractStatusOnHold=Not running -ContractStatusToRun=A mettre en service +ContractStatusToRun=To get running ContractNotRunning=This contract is not running ErrorProductAlreadyExists=A product with reference %s already exists. ErrorProductBadRefOrLabel=Wrong value for reference or label. ErrorProductClone=There was a problem while trying to clone the product or service. +ErrorPriceCantBeLowerThanMinPrice=Error Price Can't Be Lower Than Minimum Price. Suppliers=Suppliers SupplierRef=Supplier's product ref. ShowProduct=Show product diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index a32a8aa9127..c3b337c4a16 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1213,7 +1213,7 @@ class Product extends CommonObject if ($newvat == '') $newvat=$this->tva_tx; if (! empty($newminprice) && ($newminprice > $newprice)) { - $this->error='ErrorPricCanBeLowerThanMinPrice'; + $this->error='ErrorPriceCantBeLowerThanMinPrice'; return -1; } From 08c621037c76f0a1656f41ecec8dd5f878a5459a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 27 Aug 2014 11:41:18 +0200 Subject: [PATCH 7/8] fix : missing code for extrafields --- htdocs/fourn/class/fournisseur.commande.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index f083318948e..dcd19b080b5 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2010-2013 Philippe Grand + * Copyright (C) 2010-2014 Philippe Grand * Copyright (C) 2012 Marcos García * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador @@ -191,6 +191,13 @@ class CommandeFournisseur extends CommonOrder $this->extraparams = (array) json_decode($obj->extraparams, true); $this->db->free($resql); + + // Retreive all extrafield + // fetch optionals attributes and labels + require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); + $extrafields=new ExtraFields($this->db); + $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); + $this->fetch_optionals($this->id,$extralabels); if ($this->statut == 0) $this->brouillon = 1; From 34561906fcb34aa3cd88a47ef48855e6bdaa333d Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 27 Aug 2014 19:02:13 +0200 Subject: [PATCH 8/8] Fix: strict mode anarchy ;-) check your variable please --- htdocs/core/tpl/document_actions_pre_headers.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/document_actions_pre_headers.tpl.php b/htdocs/core/tpl/document_actions_pre_headers.tpl.php index ca6929331ec..b386391cec2 100644 --- a/htdocs/core/tpl/document_actions_pre_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_pre_headers.tpl.php @@ -74,7 +74,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors'); } } - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.($withproject?'&withproject=1':'')); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.(!empty($withproject)?'&withproject=1':'')); exit; } }