[base_sale_multichannel] export inventory, the stock of each product are exported repeatedly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magento OpenERP Connector |
Fix Released
|
High
|
Raphaël Valyi - http://www.akretion.com |
Bug Description
When you export the inventory, the stock of each product will be exported severals time.
And in some time it's look like the synchronization is infinite, because the same product will be export 10, 100 times or mores...
This bug is due to the fact that the products_ids come from the move in the inventory so if a product will be sold 2 times you get 2 moves and so you will have in the product_ids a double and so you will synchronize twice the stock of this products.
So before synchronize, this code " product_ids = [x for x in set(product_ids)] " is needed to delete all double
=================== line 171
else:
recent_move_ids = self.pool.
product_ids = [move.product_id.id for move in self.pool.
product_ids = [x for x in set(product_ids)] #HERE
res = self.pool.
=======
Related branches
Changed in magentoerpconnect: | |
assignee: | nobody → Raphaël Valyi - http://www.akretion.com (rvalyi) |
importance: | Undecided → High |
Ok, this has been fixed now.