A user duplicated a product to create a new one but edited the original one instead of the duplicated. We realized this as for the original product, no stock was visible (0 for all locations, even CLIENT) and no move showed up that product. I suppose it was because products are internally linked everywhere by their id and not by their title or code.
I corrected this by swapping code, infos and title between the two products. Now the history of all docs and the stocks are right for the original product.
But… since a week all stock moves and invoices are made with the wrong product (facing as the new one, code and title and price…). Now that I swapped the infos, stock is all wrong concerning the new product and the invoices don’t appear in Tryton the same as they are on generated reports.
How is it possible to repair this (swap a product by another in all docs after a given date)?
Or should we cancel all moves, sales, purchases and regenerate them with the (real) new product?