Files
manufacture/mrp_sale_info/models/sale_order_line.py
Sébastien BEAU db8a479b35 mrp_sale_info: fix duplicating SO.
Duplicating a validated SO should not keep the linked on existing mrp.production
2024-12-17 18:37:20 +01:00

19 lines
525 B
Python

# Copyright 2021 Akretion (http://www.akretion.com).
# @author Benoît GUILLOT <benoit.guillot@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
production_ids = fields.Many2many(
comodel_name="mrp.production",
relation="sale_line_production_rel",
column1="line_id",
column2="production_id",
string="Manufacturing orders",
copy=False,
)