Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent order
This commit is contained in:
parent
7cb5cc550f
commit
ff37adf6f1
@ -11,6 +11,7 @@ Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice l
|
|||||||
limit date for payment
|
limit date for payment
|
||||||
Fix: [ bug #1449 ] Trigger ORDER_CREATE, LINEORDER_DELETE, LINEORDER_UPDATE and LINEORDER_INSERT ignore interception on error
|
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 #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 *****
|
***** ChangeLog for 3.5.3 compared to 3.5.2 *****
|
||||||
Fix: Error on field accountancy code for export profile of invoices.
|
Fix: Error on field accountancy code for export profile of invoices.
|
||||||
|
|||||||
@ -112,6 +112,9 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande->
|
|||||||
{
|
{
|
||||||
if ($object->id > 0)
|
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);
|
$result=$object->createFromClone($socid);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -121,6 +124,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande->
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessage($object->error, 'errors');
|
||||||
|
$object = $orig;
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user