Fix: [ bug #1508 ] STOCK_MOVEMENT does not show trigger error message

This commit is contained in:
KreizIT 2014-07-04 16:18:54 +02:00
parent 012fc4e8fe
commit 4666de85e2
4 changed files with 17 additions and 2 deletions

View File

@ -21,6 +21,8 @@ For users:
- Fix: [ bug #1463, #1464 ] Proposal triggers problem
- Fix: [ bug #1498, #1499 ] Shipment/Delivery triggers problem
- Fix: [ bug #1465, #1466 ] Product triggers problem
- Fix: [ bug #1508 ] STOCK_MOVEMENT does not show trigger error message
For translators:
- Update language files.

View File

@ -226,6 +226,12 @@ class InterfaceDemo
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}
elseif ($action == 'PRODUCT_PRICE_MODIFY')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}
//Stock mouvement
elseif ($action == 'STOCK_MOVEMENT')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}

View File

@ -2867,7 +2867,7 @@ class Product extends CommonObject
}
else
{
dol_print_error($this->db);
$this->error=$movementstock->error;
$this->db->rollback();
return -1;
}
@ -3454,7 +3454,7 @@ class Product extends CommonObject
}
else
{
dol_print_error($this->db);
$this->error=$movementstock->error;
$this->db->rollback();
return -1;
}

View File

@ -154,6 +154,11 @@ if ($action == "correct_stock" && ! $cancel)
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$product->id);
exit;
}
else
{
setEventMessage($product->error,'errors');
$action='correction';
}
}
}
}
@ -253,6 +258,8 @@ if ($id > 0 || $ref)
$titre=$langs->trans("CardProduct".$product->type);
$picto=($product->type==1?'service':'product');
dol_fiche_head($head, 'stock', $titre, 0, $picto);
dol_htmloutput_events();
$form = new Form($db);