-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] rma: Do not set 'Destination Package' if RMA package comes from…
… 'Customers' location
- Loading branch information
1 parent
73b1041
commit a8ff16c
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) |