-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[16.0][FIX] rma, add support to handle package used on customer moves
- Loading branch information
1 parent
f0274a5
commit 253ddf8
Showing
9 changed files
with
501 additions
and
21 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
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,20 @@ | ||
from odoo import models | ||
|
||
|
||
class StockPackageLevel(models.Model): | ||
|
||
_inherit = "stock.package_level" | ||
|
||
def write(self, values): | ||
ctx = self.env.context.copy() | ||
if ( | ||
len(self) == 1 | ||
and "location_dest_id" in values | ||
and self.location_dest_id.id == values.get("location_dest_id") | ||
): | ||
ctx.update( | ||
{ | ||
"bypass_reservation_update": True, | ||
} | ||
) | ||
return super(StockPackageLevel, self.with_context(**ctx)).write(values) |
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
Oops, something went wrong.