-
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.
[IMP] introduce fields in_force_same_lot and out_force_same_lot
Those fields in the rma.operation allows us to control if we want to ensure that the same lot as the one indicated in the RMA should be used in deliveries to customers and receipts from suppliers
- Loading branch information
1 parent
433c610
commit a9ac985
Showing
8 changed files
with
73 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com) | ||
import logging | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
def _update_rma_operations(cr): | ||
_logger.info( | ||
"Updating rma operations to preset in_force_same_lot and out_force_same_lot" | ||
) | ||
cr.execute( | ||
""" | ||
UPDATE rma_operation | ||
SET in_force_same_lot=True | ||
WHERE type='customer'; | ||
""" | ||
) | ||
cr.execute( | ||
""" | ||
UPDATE rma_operation | ||
SET out_force_same_lot=True | ||
WHERE type='supplier'; | ||
""" | ||
) | ||
|
||
|
||
def migrate(cr, version): | ||
_update_rma_operations(cr) |
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
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