Update of Magento stock quantity: reduced the memory footprint and improved...

performance by using read() instead of browse() and proceeding by steps of 1000
records at a time.

Bug report: https://code.launchpad.net/bugs/1330450
Original MP: https://code.launchpad.net/~camptocamp/openerp-connector-magento/7.0-update-stock-1330450/+merge/223393
The second call is made in the context of a location (with a location in the context) in order to get their stock quantities. We need to read the products once to get their backend from which we find their location, then read them again with the location in the context.