From 7e7638792e71a8be1fd8a396c18ea719b3cd37b7 Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Thu, 17 Feb 2022 16:20:35 +0100 Subject: [PATCH] NEW : Added of the field "include_sub_warehouse" in the table "llx_inventory" --- htdocs/install/mysql/migration/15.0.0-16.0.0.sql | 2 ++ htdocs/install/mysql/tables/llx_inventory-stock.sql | 3 ++- htdocs/product/stock/tpl/extrafields_add.tpl.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql index b78e53bd287..56d5410a898 100644 --- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql +++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql @@ -237,4 +237,6 @@ ALTER TABLE llx_advtargetemailing RENAME TO llx_mailing_advtarget; ALTER TABLE llx_mailing ADD UNIQUE uk_mailing(titre, entity); +ALTER TABLE llx_inventory ADD COLUMN include_sub_warehouse boolean NOT NULL DEFAULT FALSE; + diff --git a/htdocs/install/mysql/tables/llx_inventory-stock.sql b/htdocs/install/mysql/tables/llx_inventory-stock.sql index c25ccb9767b..4053aa971b1 100644 --- a/htdocs/install/mysql/tables/llx_inventory-stock.sql +++ b/htdocs/install/mysql/tables/llx_inventory-stock.sql @@ -30,7 +30,8 @@ CREATE TABLE llx_inventory fk_warehouse integer DEFAULT NULL, fk_product integer DEFAULT NULL, status integer DEFAULT 0, - title varchar(255) NOT NULL, + title varchar(255) NOT NULL, + include_sub_warehouse boolean NOT NULL DEFAULT FALSE, date_inventory datetime DEFAULT NULL, date_validation datetime DEFAULT NULL, import_key varchar(14) -- import key diff --git a/htdocs/product/stock/tpl/extrafields_add.tpl.php b/htdocs/product/stock/tpl/extrafields_add.tpl.php index 62921f0a6e0..4dcddcad672 100644 --- a/htdocs/product/stock/tpl/extrafields_add.tpl.php +++ b/htdocs/product/stock/tpl/extrafields_add.tpl.php @@ -37,13 +37,13 @@ if (empty($conf) || !is_object($conf)) { // Other attributes if (!isset($parameters)) $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $movement, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { $params = array(); if (isset($tpl_context)) $params['tpl_context'] = $tpl_context; $params['cols'] = $parameters['colspanvalue']; + var_dump($movement); print $movement->showOptionals($extrafields, 'create', $params); }