Use shipment_party location when available
The shipment will use the shipment_party so the location of moves should also otherwise the outgoing move domain is not respected. issue6368 review33231002
This commit is contained in:
1 parent
2333ac8f7f
commit
4cd7175fb9
1 file changed
+4
-2
@@ -1277,11 +1277,13 @@ class SaleLine(sequence_ordered(), ModelSQL, ModelView):
|
||||
if self.warehouse:
|
||||
return self.warehouse.output_location.id
|
||||
else:
|
||||
return self.sale.party.customer_location.id
|
||||
party = self.sale.shipment_party or self.sale.party
|
||||
return party.customer_location.id
|
||||
|
||||
def get_to_location(self, name):
|
||||
if (self.quantity or 0) >= 0:
|
||||
return self.sale.party.customer_location.id
|
||||
party = self.sale.shipment_party or self.sale.party
|
||||
return party.customer_location.id
|
||||
else:
|
||||
if self.warehouse:
|
||||
return self.warehouse.input_location.id
|
||||
|
||||
Reference in new issue
Block a user