mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] mrp_workorder_sequence: Migration to 13.0
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
|
||||
# Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
from odoo import api, models
|
||||
from odoo import models
|
||||
|
||||
|
||||
class MrpProduction(models.Model):
|
||||
_inherit = "mrp.production"
|
||||
|
||||
@api.multi
|
||||
def _reset_work_order_sequence(self):
|
||||
for rec in self:
|
||||
current_sequence = 1
|
||||
@@ -15,7 +14,6 @@ class MrpProduction(models.Model):
|
||||
work.sequence = current_sequence
|
||||
current_sequence += 1
|
||||
|
||||
@api.multi
|
||||
def _generate_workorders(self, exploded_boms):
|
||||
res = super()._generate_workorders(exploded_boms)
|
||||
self._reset_work_order_sequence()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
|
||||
# Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
Reference in New Issue
Block a user