Files
manufacture/mrp_multi_level/models/mrp_production.py
Matt Taylor f1534187f4 [IMP] mrp_multi_level: mrp cleanup performance
- Index the planned_order_id column on mrp.production model
- Delete from mrp.planned.order before deleting from mrp.inventory
2024-10-22 09:38:16 -06:00

16 lines
429 B
Python

# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# - Héctor Villarreal <hector.villarreal@forgeflow.com>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models
class MrpProduction(models.Model):
"""Manufacturing Orders"""
_inherit = "mrp.production"
planned_order_id = fields.Many2one(
comodel_name="mrp.planned.order",
index=True,
)