Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
14
sale_mrp_bom/models/stock_move.py
Executable file
14
sale_mrp_bom/models/stock_move.py
Executable file
@@ -0,0 +1,14 @@
|
||||
# Copyright 2020 Akretion Renato Lima <renato.lima@akretion.com.br>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class StockMove(models.Model):
|
||||
_inherit = "stock.move"
|
||||
|
||||
def _prepare_procurement_values(self):
|
||||
values = super()._prepare_procurement_values()
|
||||
if self.sale_line_id and self.sale_line_id.bom_id:
|
||||
values["bom_id"] = self.sale_line_id.bom_id
|
||||
return values
|
||||
Reference in New Issue
Block a user