-
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.
[16.0][FIX] rma, add support to handle package used on customer moves
- Loading branch information
1 parent
3c0e9c4
commit d0df9bf
Showing
9 changed files
with
475 additions
and
16 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.