[Vtigercrm-developers] Events with webservices (Inventory Records)

Conrado Maggi comaggi at gmail.com
Tue Dec 2 12:20:54 GMT 2014


Confirmed..

The API is calling the function save_module in the SalesOrder class which
uses the function saveInventoryProductDetails which expected the products
information to be on the $_REQUEST therefore its saves nothing. Creates a
SalesOrder with no products.

After that you are running setLineItems back in API. By now all the event
have already run :(

Conclusion: There is no way to use events that need products information
when using the API to create the inventory record.

Regards



Hello,

I'm running an after save event on sales order module. If I manually
created a new SalesOrder the event works fine.

Now I'm creating a new Sales Order using webservices but the when I call
the function Inventory_Record_Model::getProducts() the array does not
include products line information.

If like the event is fire after the SalesOrder is saved but before the
table inventoryproductrel is updated.

This happens only when I create the order with webservices, not manually.

Have anyone seem this before? Any workaround? Maybe creating the order with
the Class instead of the API?

Thanks,
Conrado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20141202/3e376902/attachment.html>


More information about the vtigercrm-developers mailing list