mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Ignore storage types constraints on quants in cells
When the putaway selects a tray and a cell according to the storage type, we still want the user to be able to override the selection by scanning another tray type.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from . import stock_location
|
||||
from . import stock_location_tray_type
|
||||
from . import stock_quant
|
||||
from . import vertical_lift_operation_put
|
||||
|
||||
18
stock_vertical_lift_storage_type/models/stock_quant.py
Normal file
18
stock_vertical_lift_storage_type/models/stock_quant.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Copyright 2020 Camptocamp SA
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
||||
from odoo import models
|
||||
|
||||
|
||||
class StockQuant(models.Model):
|
||||
|
||||
_inherit = "stock.quant"
|
||||
|
||||
def _check_storage_type(self):
|
||||
# disable the checks when placing goods in vertical lift cells:
|
||||
# we still want to benefit of the storage type rules to select
|
||||
# a destination, but we want to allow selecting a different tray
|
||||
# type
|
||||
self = self.filtered(
|
||||
lambda quant: quant.location_id.vertical_lift_kind != "cell"
|
||||
)
|
||||
super()._check_storage_type()
|
||||
Reference in New Issue
Block a user