mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Normal BoM products (those which are manufactured) are regular stored products and their immediately_usable_qty will be summed with potential stock. This was the expected behavior of the module and it was lost at some point. Phantom BoM products (kits) don't have real stock so their available to promise quantity will be the same as the potential. As an improvement, we've added the possibility to override the sum of potential and available to promise. In some cases such addition doesn't make sense as we don't know how long can take to manufacture those potential units. TT35589
14 lines
455 B
Python
14 lines
455 B
Python
# Copyright 2022 Tecnativa - David Vidal
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
from odoo import fields, models
|
|
|
|
|
|
class MrpBom(models.Model):
|
|
_inherit = "mrp.bom"
|
|
|
|
add_potential_exception = fields.Boolean(
|
|
string="Avoid adding potential to available to promise",
|
|
help="If potential qty added to available to promise is set in the company "
|
|
"we can override this option for single BoMs",
|
|
)
|