[MIG] mrp_workorder_sequence: Migration to 13.0

This commit is contained in:
ps-tubtim
2020-03-12 15:40:50 +07:00
parent 64b4eb72c8
commit a63b0df905
9 changed files with 26 additions and 20 deletions

View File

@@ -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()

View File

@@ -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