It happens when you create a sales or a purchase order in GWT grid view, if you add an item without productId and then click on save all button.
Then you get an error aying no product code. If you delete manually the productId empty line and click again on save all button all products will double quantity.