fix : allow create from other external modules
This commit is contained in:
parent
6654b138b9
commit
e73573d7c4
@ -8,7 +8,8 @@
|
||||
* Copyright (C) 2012-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Ion Agorria <ion@agorria.com>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -1211,13 +1212,15 @@ if (empty($reshook)) {
|
||||
if (!$error) {
|
||||
// If creation from another object of another module (Example: origin=propal, originid=1)
|
||||
if (!empty($origin) && !empty($originid)) {
|
||||
$element = $subelement = $origin;
|
||||
$classname = ucfirst($subelement);
|
||||
if ($origin == 'propal' || $origin == 'proposal') {
|
||||
$classname = 'Propal';
|
||||
$element = 'comm/propal'; $subelement = 'propal';
|
||||
} elseif ($origin == 'order' || $origin == 'commande') {
|
||||
$classname = 'Commande';
|
||||
}
|
||||
if ($origin == 'order' || $origin == 'commande') {
|
||||
$element = $subelement = 'commande';
|
||||
} else {
|
||||
}
|
||||
if ($origin == 'supplier_proposal') {
|
||||
$classname = 'SupplierProposal';
|
||||
$element = 'supplier_proposal';
|
||||
$subelement = 'supplier_proposal';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user