Don't create duplicate move
supply_on_sale could be changed between two calls on get_move so we must also check if a purchase request is not yet created. review857002 (transplanted from b8717ff3e5597d65046fb9da828b56a82d45b512)
This commit is contained in:
1 parent
d12029c684
commit
a05eca4e78
1 file changed
+2
-1
@@ -82,7 +82,8 @@ class SaleLine:
|
||||
def get_move(self, shipment_type):
|
||||
move = super(SaleLine, self).get_move(shipment_type)
|
||||
if (shipment_type == 'out'
|
||||
and self.supply_on_sale):
|
||||
and (self.supply_on_sale
|
||||
or self.purchase_request)):
|
||||
if self.purchase_request_state in ('', 'requested'):
|
||||
return
|
||||
return move
|
||||
|
||||
Reference in new issue
Block a user