From e2696d7718f4ef6e344c0c50ff7509af3996d262 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Fri, 15 Jan 2021 09:58:04 +0100 Subject: [PATCH 1/3] FIX Societe Merge : "unknow column fk_soc" + "Delivery" label --- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 3 +++ htdocs/install/mysql/tables/llx_mrp_production.sql | 3 ++- htdocs/societe/card.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 309d4d4b170..f1ea3d237a3 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -555,3 +555,6 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging varchar(64); ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL; +ALTER TABLE llx_mrp_production ADD COLUMN fk_soc integer NOT NULL; + + diff --git a/htdocs/install/mysql/tables/llx_mrp_production.sql b/htdocs/install/mysql/tables/llx_mrp_production.sql index bd0cd722f1a..d2b44427f58 100644 --- a/htdocs/install/mysql/tables/llx_mrp_production.sql +++ b/htdocs/install/mysql/tables/llx_mrp_production.sql @@ -16,7 +16,8 @@ CREATE TABLE llx_mrp_production( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - fk_mo integer NOT NULL, + fk_mo integer NOT NULL, + fk_soc integer NOT NULL, position integer NOT NULL DEFAULT 0, fk_product integer NOT NULL, fk_warehouse integer, diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 356c70baf3d..2f51995c785 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -249,7 +249,7 @@ if (empty($reshook)) 'FactureFournisseur' => '/fourn/class/fournisseur.facture.class.php', 'SupplierProposal' => '/supplier_proposal/class/supplier_proposal.class.php', 'ProductFournisseur' => '/fourn/class/fournisseur.product.class.php', - 'Livraison' => '/delivery/class/delivery.class.php', + 'Delivery' => '/delivery/class/delivery.class.php', 'Product' => '/product/class/product.class.php', 'Project' => '/projet/class/project.class.php', 'Ticket' => '/ticket/class/ticket.class.php', From cfca26a727e1aac64e73cca026f31dc4385cd079 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Fri, 29 Jan 2021 16:20:43 +0100 Subject: [PATCH 2/3] Fix fix --- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 4 ---- htdocs/install/mysql/tables/llx_mrp_production.sql | 1 - htdocs/mrp/class/mo.class.php | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index f1ea3d237a3..31cdf9c8d62 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -554,7 +554,3 @@ INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging varchar(64); ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL; - -ALTER TABLE llx_mrp_production ADD COLUMN fk_soc integer NOT NULL; - - diff --git a/htdocs/install/mysql/tables/llx_mrp_production.sql b/htdocs/install/mysql/tables/llx_mrp_production.sql index d2b44427f58..36129a54aea 100644 --- a/htdocs/install/mysql/tables/llx_mrp_production.sql +++ b/htdocs/install/mysql/tables/llx_mrp_production.sql @@ -17,7 +17,6 @@ CREATE TABLE llx_mrp_production( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, fk_mo integer NOT NULL, - fk_soc integer NOT NULL, position integer NOT NULL DEFAULT 0, fk_product integer NOT NULL, fk_warehouse integer, diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 274782a14ea..2de6aecc4bf 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1352,7 +1352,7 @@ class Mo extends CommonObject */ public static function replaceThirdparty($db, $origin_id, $dest_id) { - $tables = array('mrp_production'); + $tables = array('mrp_mo'); return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } From 2436e7c5b24dc9332e6208056ef3efa4ac0ab88f Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Fri, 29 Jan 2021 19:39:50 +0100 Subject: [PATCH 3/3] FIX: 13 create MO, Column 'tms' cannot be null --- htdocs/mrp/class/mo.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 274782a14ea..17d4217bbcd 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -106,7 +106,7 @@ class Mo extends CommonObject 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61, 'notnull'=>-1,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62, 'notnull'=>-1,), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,), - 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>-1,), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,), 'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>502,), 'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'user.rowid',), 'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1,),