diff --git a/ChangeLog b/ChangeLog
index c6a1f6c1efa..95e1ec18bd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,33 +2,6 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
-***** ChangeLog for 10.0.5 compared to 10.0.4 *****
-FIX: 10.0: add URL param "restore_last_search_values=1" to all backlinks pointing to lists
-FIX: 10.0: do not display single-letter values (indicating duration unit without value) in product list
-FIX: #12473
-FIX: #12481 : fix ticket creation from thirdparty, mission $socid var
-FIX: #12482
-FIX: #12644
-FIX: #12665 Mass invoice validation with stock management
-FIX: #12688
-FIX: #12745
-FIX: add and modify category translate form with posted values on errors
-FIX: add URL param "restore_last_search_values=1" to all backlinks that point to a list
-FIX: CommandeFournisseurLigne update function must not be able to return other value than 1 if success
-FIX: contact card state address selected after filling address
-FIX: dol_string_nohtmltag when there is html with windows EOL "
\r\n"
-FIX: filter language is an array
-FIX: first col at wrong position in Export 2007 (new)
-FIX: getrights() request
-FIX: Invoice Situation integration into Margin
-FIX: missing nl2br conversion
-FIX: not fee in payout list
-FIX: product_fourn_price_id was assigned too late for logPrice() function
-FIX: Reduce number of request for list of products
-FIX: set due date in object in create invoice
-FIX: units traductions for selectUnits() function
-FIX: when we need to bill several orders, order lines unit is not on bill lines
-NEW: 9.0: allow users to use the mysqldump '--quick' option
***** ChangeLog for 12.0.0 compared to 11.0.0 *****
For Users:
@@ -48,9 +21,10 @@ Following changes may create regressions for some external modules, but were nec
***** ChangeLog for 11.0.0 compared to 10.0.0 *****
For Users:
-NEW: Module BOM is now stable (Module MO - Manufacturing Order is still in development).
+NEW: Module BOM is now stable.
+NEW: Module MO - Manufacturing Order available with experimental status.
NEW: Can set the Address/Contact by default on third parties.
-NEW: Add a dictionary for list of Social networks
+NEW: Add a dictionary to edit list of Social networks.
NEW: A nicer dashboard for open elements on Home page.
NEW: Add task widget and add task progress bar
NEW: Support of deployment of metapackages
@@ -254,6 +228,34 @@ Following changes may create regressions for some external modules, but were nec
* The jquery plugin/dependency multiselect has been removed. It was not used by Dolibarr core.
+***** ChangeLog for 10.0.5 compared to 10.0.4 *****
+FIX: 10.0: add URL param "restore_last_search_values=1" to all backlinks pointing to lists
+FIX: 10.0: do not display single-letter values (indicating duration unit without value) in product list
+FIX: #12473
+FIX: #12481 : fix ticket creation from thirdparty, mission $socid var
+FIX: #12482
+FIX: #12644
+FIX: #12665 Mass invoice validation with stock management
+FIX: #12688
+FIX: #12745
+FIX: add and modify category translate form with posted values on errors
+FIX: add URL param "restore_last_search_values=1" to all backlinks that point to a list
+FIX: CommandeFournisseurLigne update function must not be able to return other value than 1 if success
+FIX: contact card state address selected after filling address
+FIX: dol_string_nohtmltag when there is html with windows EOL "
\r\n"
+FIX: filter language is an array
+FIX: first col at wrong position in Export 2007 (new)
+FIX: getrights() request
+FIX: Invoice Situation integration into Margin
+FIX: missing nl2br conversion
+FIX: not fee in payout list
+FIX: product_fourn_price_id was assigned too late for logPrice() function
+FIX: Reduce number of request for list of products
+FIX: set due date in object in create invoice
+FIX: units traductions for selectUnits() function
+FIX: when we need to bill several orders, order lines unit is not on bill lines
+NEW: 9.0: allow users to use the mysqldump '--quick' option
+
***** ChangeLog for 10.0.4 compared to 10.0.3 *****
FIX: The pdf templates were using the large logo making PDF too large (and edition of proposal, order, invoice VERY slow)
FIX: #12258
diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index a980df3e6fc..1caa0c347b4 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -97,11 +97,13 @@ if (empty($reshook))
$backurlforlist = DOL_URL_ROOT.'/bom/bom_list.php';
if (empty($backtopage) || ($cancel && empty($id))) {
- //var_dump($backurlforlist);exit;
- if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist;
- else $backtopage = DOL_URL_ROOT.'/bom/bom_card.php?id='.($id > 0 ? $id : '__ID__');
+ if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
+ if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist;
+ else $backtopage = dol_buildpath('/bom/bom_card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
+ }
}
- $triggermodname = 'BOM_MODIFY'; // Name of trigger action code to execute when we modify record
+
+ $triggermodname = 'BOM_MODIFY'; // Name of trigger action code to execute when we modify record
// Actions cancel, add, update, delete or clone
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
@@ -169,7 +171,9 @@ if (empty($reshook))
}
else
{
- unset($_POST['qty_frozen']);
+ unset($_POST['idprod']);
+ unset($_POST['qty']);
+ unset($_POST['qty_frozen']);
unset($_POST['disable_stock_change']);
}
}
@@ -207,7 +211,9 @@ if (empty($reshook))
}
else
{
- unset($_POST['qty_frozen']);
+ unset($_POST['idprod']);
+ unset($_POST['qty']);
+ unset($_POST['qty_frozen']);
unset($_POST['disable_stock_change']);
}
}
@@ -644,7 +650,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
if ($object->status == $object::STATUS_VALIDATED && !empty($user->rights->mrp->write))
{
- print 'id).'">'.$langs->trans("CreateMO").'';
+ print 'id).'">'.$langs->trans("CreateMO").'';
}
}
diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php
index b30cc1a411d..59606ee65b5 100644
--- a/htdocs/core/actions_addupdatedelete.inc.php
+++ b/htdocs/core/actions_addupdatedelete.inc.php
@@ -36,7 +36,12 @@ if ($cancel)
{
/*var_dump($cancel);
var_dump($backtopage);exit;*/
- if (!empty($backtopage))
+ if (!empty($backtopageforcancel))
+ {
+ header("Location: ".$backtopageforcancel);
+ exit;
+ }
+ elseif (!empty($backtopage))
{
header("Location: ".$backtopage);
exit;
diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql
index 24c62c040e4..18972bc6b8f 100644
--- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql
+++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql
@@ -554,6 +554,7 @@ ALTER TABLE llx_mrp_production MODIFY COLUMN qty real NOT NULL DEFAULT 1;
ALTER TABLE llx_mrp_production ADD COLUMN qty_frozen smallint DEFAULT 0;
ALTER TABLE llx_mrp_production ADD COLUMN disable_stock_change smallint DEFAULT 0;
+
ALTER TABLE llx_mrp_production ADD CONSTRAINT fk_mrp_production_mo FOREIGN KEY (fk_mo) REFERENCES llx_mrp_mo (rowid);
ALTER TABLE llx_mrp_production ADD CONSTRAINT fk_mrp_production_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
ALTER TABLE llx_mrp_production ADD CONSTRAINT fk_mrp_production_stock_movement FOREIGN KEY (fk_stock_movement) REFERENCES llx_stock_mouvement (rowid);
diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql
index 47d3127274f..4660eaf9246 100644
--- a/htdocs/install/mysql/migration/repair.sql
+++ b/htdocs/install/mysql/migration/repair.sql
@@ -201,6 +201,13 @@ delete from llx_element_element where sourcetype='commande' and fk_source not in
DELETE FROM llx_actioncomm_resources WHERE fk_actioncomm not in (select id from llx_actioncomm);
+-- Fix: delete orphelin links in llx_bank_url
+DELETE from llx_bank_url where type = 'payment' and url_id not in (select rowid from llx_paiement);
+DELETE from llx_bank_url where type = 'payment_supplier' and url_id not in (select rowid from llx_paiementfourn);
+DELETE from llx_bank_url where type = 'company' and url_id not in (select rowid from llx_societe);
+--SELECT * from llx_bank where rappro = 0 and label LIKE '(CustomerInvoicePayment%)' and rowid not in (select fk_bank from llx_bank_url where type = 'payment');
+--SELECT * from llx_bank where rappro = 0 and label LIKE '(SupplierInvoicePayment%)' and rowid not in (select fk_bank from llx_bank_url where type = 'payment_supplier');
+
-- Fix link on parent that were removed
DROP table tmp_user;
CREATE TABLE tmp_user as (select * from llx_user);
@@ -462,7 +469,10 @@ update llx_facturedet set product_type = 1 where product_type = 0 AND fk_product
update llx_facture_fourn_det set product_type = 0 where product_type = 1 AND fk_product > 0 AND fk_product IN (SELECT rowid FROM llx_product WHERE fk_product_type = 0);
update llx_facture_fourn_det set product_type = 1 where product_type = 0 AND fk_product > 0 AND fk_product IN (SELECT rowid FROM llx_product WHERE fk_product_type = 1);
-
+
+DELETE FROM llx_mrp_production where qty = 0;
+
+
UPDATE llx_accounting_bookkeeping set date_creation = tms where date_creation IS NULL;
diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index 6bec44d66e6..faec35f6d46 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -54,6 +54,7 @@ ToConsume=To consume
ToProduce=To produce
QtyAlreadyConsumed=Qty already consumed
QtyAlreadyProduced=Qty already produced
+ConsumeOrProduce=Consume or Produce
ConsumeAndProduceAll=Consume and Produce All
Manufactured=Manufactured
TheProductXIsAlreadyTheProductToProduce=The product to add is already the product to produce.
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index 3e01db9fffb..e85c6ccec91 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -143,6 +143,7 @@ InventoryCode=Movement or inventory code
IsInPackage=Contained into package
WarehouseAllowNegativeTransfer=Stock can be negative
qtyToTranferIsNotEnough=You don't have enough stock from your source warehouse and your setup does not allow negative stocks.
+qtyToTranferLotIsNotEnough=You don't have enough stock, for this lot number, from your source warehouse and your setup does not allow negative stocks (Qty for product '%s' with lot '%s' is %s in warehouse '%s').
ShowWarehouse=Show warehouse
MovementCorrectStock=Stock correction for product %s
MovementTransferStock=Stock transfer of product %s into another warehouse
diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php
index be784dbf5ad..df7ad6ea94f 100644
--- a/htdocs/mrp/class/mo.class.php
+++ b/htdocs/mrp/class/mo.class.php
@@ -496,6 +496,7 @@ class Mo extends CommonObject
if ($obj) {
$resarray[] = array(
'rowid'=> $obj->rowid,
+ 'date'=> $this->db->jdate($obj->date_creation),
'qty' => $obj->qty,
'role' => $obj->role,
'fk_product' => $obj->fk_product,
diff --git a/htdocs/mrp/index.php b/htdocs/mrp/index.php
index 8f893f832bf..26524b2df6d 100644
--- a/htdocs/mrp/index.php
+++ b/htdocs/mrp/index.php
@@ -93,7 +93,7 @@ if ($conf->use_javascript_ajax)
print '
| '.$langs->trans("Statistics").' | |
|---|---|
| '.$langs->trans("Statistics").' - '.$langs->trans("MO").' | |
| '; diff --git a/htdocs/mrp/lib/mrp_mo.lib.php b/htdocs/mrp/lib/mrp_mo.lib.php index 2e47c7bf621..c3f8e7825d4 100644 --- a/htdocs/mrp/lib/mrp_mo.lib.php +++ b/htdocs/mrp/lib/mrp_mo.lib.php @@ -43,6 +43,12 @@ function moPrepareHead($object) $head[$h][0] = DOL_URL_ROOT.'/mrp/mo_production.php?id='.$object->id; $head[$h][1] = $langs->trans("Production"); + $arrayproduced = $object->fetchLinesLinked('produced', 0); + $nbProduced = 0; + foreach($arrayproduced as $lineproduced) { + $nbProduced += $lineproduced['qty']; + } + $head[$h][1].= ''.$nbProduced.' / '.$object->qty.''; $head[$h][2] = 'production'; $h++; diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 68938f97a58..1993f6e46aa 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -62,6 +62,7 @@ $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mocard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); //$lineid = GETPOST('lineid', 'int'); // Initialize technical objects @@ -135,6 +136,10 @@ if (empty($reshook)) else $backtopage = DOL_URL_ROOT.'/mrp/mo_card.php?id='.($id > 0 ? $id : '__ID__'); } } + if ($cancel && ! empty($backtopageforcancel)) { + $backtopage = $backtopageforcancel; + } + $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen @@ -202,7 +207,8 @@ if ($action == 'create') print ' |