pluginsGLPI / order

Order plugin for GLPI
GNU General Public License v3.0
40 stars 45 forks source link

fix asset generation #239

Closed orthagh closed 5 years ago

orthagh commented 5 years ago

fix #234

benjaminEORIS commented 5 years ago

Helo,

The fix is working.

I think the same problem is present if you configure Enable generate automatic on yes.

Error :

`[Wed Jun 12 11:02:07.226900 2019] [:error] [pid 1114] [client 192.168.64.1:63581] PHP Fatal error: Uncaught Error: Class name must be a valid object or a string in /opt/glpi/plugins/order/inc/reference.class.php:421 Stack trace:

0 /opt/glpi/plugins/order/inc/link.class.php(1134): PluginOrderReference->checkIfTemplateExistsInEntity(115, NULL, '0')

1 /opt/glpi/plugins/order/inc/reception.class.php(934): PluginOrderLink->generateNewItem(Array)

2 /opt/glpi/plugins/order/inc/reception.class.php(808): PluginOrderReception::generateAsset(Array)

3 /opt/glpi/plugins/order/inc/reception.class.php(540): PluginOrderReception->updateReceptionStatus(Object(MassiveAction))

4 /opt/glpi/inc/massiveaction.class.php(991): PluginOrderReception::processMassiveActionsForOneItemtype(Object(MassiveAction), Object(PluginOrderReception), Array)

5 /opt/glpi/inc/massiveaction.class.php(970): MassiveAction->processForSeveralItemtypes()

6 /opt/glpi/front/massiveaction.php(59): MassiveAction->process()

7 {main}\n thrown in /opt/glpi/plugins/order/inc/reference.class.php on line 421, referer: http://192.168.64.130/plugins/order/front/order.form.php?id=23`

cedric-anne commented 5 years ago

Hi @benjaminEORIS ,

241 should fix automatic asset generation.

Regards