Files
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

20 lines
638 B
Python
Executable File

# Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _update_candidate_moves_list(self, candidate_moves_set):
"""
We want to merge stock moves within the procurement group only
"""
res = super()._update_candidate_moves_list(candidate_moves_set)
if self.env.context.get("sale_group_by_line"):
candidate_moves_set.add(
self.sale_line_id.procurement_group_id.stock_move_ids
)
return res