2
0
forked from Wavyzz/dolibarr

Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent order

This commit is contained in:
Marcos García de La Fuente
2014-06-10 13:47:30 +02:00
parent 7cb5cc550f
commit ff37adf6f1
2 changed files with 5 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice l
limit date for payment
Fix: [ bug #1449 ] Trigger ORDER_CREATE, LINEORDER_DELETE, LINEORDER_UPDATE and LINEORDER_INSERT ignore interception on error
Fix: [ bug #1450 ] Several Customer order's triggers do not report the error from the trigger handler
Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent order
***** ChangeLog for 3.5.3 compared to 3.5.2 *****
Fix: Error on field accountancy code for export profile of invoices.

View File

@@ -112,6 +112,9 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande->
{
if ($object->id > 0)
{
//Because createFromClone modifies the object, we must clone it so that we can restore it later
$orig = clone $object;
$result=$object->createFromClone($socid);
if ($result > 0)
{
@@ -121,6 +124,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande->
else
{
setEventMessage($object->error, 'errors');
$object = $orig;
$action='';
}
}