-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] repair_type: Remove duplicated destination location for added p…
…arts and add product destination location
- Loading branch information
Showing
13 changed files
with
219 additions
and
112 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from . import repair | ||
from . import stock_move | ||
from . import stock_picking_type |
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 Patryk Pyczko (APSL-Nagarro)<[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class RepairOrder(models.Model): | ||
_inherit = "repair.order" | ||
|
||
product_location_dest_id = fields.Many2one( | ||
"stock.location", | ||
"Product Destination Location", | ||
compute="_compute_product_location_dest_id", | ||
store=True, | ||
readonly=False, | ||
required=True, | ||
precompute=True, | ||
index=True, | ||
check_company=True, | ||
help="This is the location where the repaired product will be stored.", | ||
) | ||
|
||
@api.depends("picking_type_id") | ||
def _compute_product_location_dest_id(self): | ||
for repair in self: | ||
repair.product_location_dest_id = ( | ||
repair.picking_type_id.default_product_location_dest_id | ||
) |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
This module adds the source location from removing and recycling components. If we select the both locations on stock picking type when you select that in a Repair Order, Odoo will automatically set that in stock moves for that components. | ||
This module adds support for source locations when adding, removing, or recycling components. If you specify any of these types in a Repair Order, Odoo will automatically apply the corresponding locations from the related stock picking type to the stock moves. | ||
|
||
Additionally, it adds a default destination location for the repaired product. |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Set stock picking type for repairs and select source locations for removing and recycling components. | ||
Afterwards selecting that stock picking type on a Repair Order will automatically put that source location on stock moves of that components. | ||
- Set the stock picking type for repairs and define source locations for adding, removing and recycling components. | ||
- When you select this stock picking type in a Repair Order, Odoo will automatically assign the specified source locations to the stock moves for the respective components. |
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.