mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[FIX] rma: Do not set 'Destination Package' if RMA package comes from 'Customers' location
This commit is contained in:
committed by
PauBForgeFlow
parent
73b104175a
commit
e43156e027
14
rma/models/stock_quant_package.py
Normal file
14
rma/models/stock_quant_package.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright (C) 2023 ForgeFlow S.L.
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class QuantPackage(models.Model):
|
||||
_inherit = "stock.quant.package"
|
||||
|
||||
def _allowed_to_move_between_transfers(self):
|
||||
res = super(QuantPackage, self)._allowed_to_move_between_transfers()
|
||||
return res and self.location_id != self.env.ref(
|
||||
"stock.stock_location_customers"
|
||||
)
|
||||
Reference in New Issue
Block a user