Comment 8 for bug 688225

Revision history for this message
Raphaƫl Valyi - http://www.akretion.com (rvalyi) wrote :

Hello Kyle,

All right, at least this is very clear to me now and well, once again, I Magento deserve it's trophy in the hall of horrors.
Frankly did those guys think for a sec before they made their stupid API??? I mean, I'm very serious.

Here, when we see that we don't have the product in OpenERP, we try to get it from Magento using the Magento product API and the product_id.
Now take a look here: http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product#catalog_product.info

WTF ?!!
Arguments: mixed product - product ID or Sku
I'll repeat it: "product ID or Sku" Ha Ha Ha
Ha Ha Ha
Ha Ha Ha

So before in earlier Magento version perhaps, or just if you had some luck, well, when we asked for the Magento product with the product_id from the order_line, well Magento would have answered the right product info so we could create it on the fly in OpenERP.
But, because those guys are absolutely stupids, now, if by lack of luck, your product_id actually matches some Magento product SKU, then Magento returns you the product info of the wrong product!!!!!!

I'm still not sure how we can fix that. The most obvious way would be instead to take the product sku in the order line and request the product from Magento using the SKU directly.
Now it sucks as it breaks a lot of our nice abstraction to deal with external entities without specific code. I think I'l take that way, but I'm really disappointed by Magento once again. People with no professional skills should NEVER design API's.

Fix coming hopefully.