mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock.request's location_id conflict with stock.request.order's
This commit is contained in:
@@ -17,8 +17,8 @@ class StockRequest(models.Model):
|
|||||||
@api.onchange("direction")
|
@api.onchange("direction")
|
||||||
def _onchange_location_id(self):
|
def _onchange_location_id(self):
|
||||||
if self.direction == "outbound":
|
if self.direction == "outbound":
|
||||||
# Partner Locations/Customers
|
# Stock Location set to Partner Locations/Customers
|
||||||
self.location_id = self.env.ref("stock.stock_location_customers")
|
self.location_id = self.company_id.partner_id.property_stock_customer.id
|
||||||
else:
|
else:
|
||||||
# Otherwise the Stock Location of the Warehouse
|
# Otherwise the Stock Location of the Warehouse
|
||||||
self.location_id = self.warehouse_id.lot_stock_id.id
|
self.location_id = self.warehouse_id.lot_stock_id.id
|
||||||
|
|||||||
Reference in New Issue
Block a user