mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
17 lines
526 B
Python
17 lines
526 B
Python
# Copyright (C) 2017 Akretion (http://www.akretion.com). All Rights Reserved
|
|
# @author Florian DA COSTA <florian.dacosta@akretion.com>
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import models
|
|
|
|
|
|
class MrpProduction(models.Model):
|
|
_inherit = "mrp.production"
|
|
|
|
def action_confirm(self):
|
|
res = super(MrpProduction, self).action_confirm()
|
|
to_assign = self.filtered(lambda p: p.reservation_state)
|
|
if to_assign:
|
|
to_assign.action_assign()
|
|
return res
|