Files
manufacture/mrp_production_auto_validate/models/stock_rule.py
Akim Juillerat a8e4fa8ddb mrp_p_auto_validate: split qty on create
- split values for create in dedicated function
- post messages on MO with modified qty
- split MOs on create only on procurements
2023-09-13 13:46:01 +02:00

14 lines
398 B
Python

# Copyright 2023 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import api, models
class StockRule(models.Model):
_inherit = "stock.rule"
@api.model
def _run_manufacture(self, procurements):
return super(
StockRule, self.with_context(_split_create_values_for_auto_validation=True)
)._run_manufacture(procurements)