Do not deactivate product in replacement wizard
If the product can be deactivated, it must be deactivated using the proper method so all the operations like deleting staging and draft moves are performed. Otherwise the stock moves for the deactivated product will stay. Closes #13677
This commit is contained in:
@@ -929,9 +929,8 @@ class ProductReplace(Wizard):
|
||||
destination = self.ask.destination
|
||||
|
||||
source.replaced_by = destination
|
||||
if source.can_be_deactivated():
|
||||
source.active = False
|
||||
source.save()
|
||||
self.model.deactivate_replaced([source])
|
||||
return 'end'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user