[MIG] mrp_workorder_sequence: Migration to 17.0

This commit is contained in:
Antoni Marroig Campomar
2024-04-24 09:22:00 +02:00
parent bd841de5ff
commit e7e37f2d0e
6 changed files with 28 additions and 12 deletions

View File

@@ -63,10 +63,17 @@ Contributors
------------ ------------
- Lois Rilo <lois.rilo@forgeflow.com> - Lois Rilo <lois.rilo@forgeflow.com>
- Pimolnat Suntian <pimolnats@ecosoft.co.th> - Pimolnat Suntian <pimolnats@ecosoft.co.th>
- Christopher Ormaza <chris.ormaza@forgeflow.com> - Christopher Ormaza <chris.ormaza@forgeflow.com>
- Akim Juillerat <akim.juillerat@camptocamp.com> - Akim Juillerat <akim.juillerat@camptocamp.com>
- `APSL <https://www.apsl.tech>`__:
- Antoni Marroig <amarroig@apsl.net>
Maintainers Maintainers
----------- -----------

View File

@@ -4,7 +4,7 @@
{ {
"name": "MRP Work Order Sequence", "name": "MRP Work Order Sequence",
"summary": "adds sequence to production work orders.", "summary": "adds sequence to production work orders.",
"version": "16.0.0.1.0", "version": "17.0.1.0.0",
"category": "Manufacturing", "category": "Manufacturing",
"author": "ForgeFlow, Odoo Community Association (OCA)", "author": "ForgeFlow, Odoo Community Association (OCA)",
"development_status": "Beta", "development_status": "Beta",

View File

@@ -2,8 +2,8 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
def post_init_hook(cr, registry): def post_init_hook(env):
cr.execute( env.cr.execute(
""" """
UPDATE mrp_workorder UPDATE mrp_workorder
SET sequence = n.sequence SET sequence = n.sequence

View File

@@ -2,3 +2,6 @@
- Pimolnat Suntian \<<pimolnats@ecosoft.co.th>\> - Pimolnat Suntian \<<pimolnats@ecosoft.co.th>\>
- Christopher Ormaza \<<chris.ormaza@forgeflow.com>\> - Christopher Ormaza \<<chris.ormaza@forgeflow.com>\>
- Akim Juillerat \<<akim.juillerat@camptocamp.com>\> - Akim Juillerat \<<akim.juillerat@camptocamp.com>\>
- [APSL](https://www.apsl.tech):
- Antoni Marroig \<<amarroig@apsl.net>\>

View File

@@ -412,6 +412,10 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<li>Pimolnat Suntian &lt;<a class="reference external" href="mailto:pimolnats&#64;ecosoft.co.th">pimolnats&#64;ecosoft.co.th</a>&gt;</li> <li>Pimolnat Suntian &lt;<a class="reference external" href="mailto:pimolnats&#64;ecosoft.co.th">pimolnats&#64;ecosoft.co.th</a>&gt;</li>
<li>Christopher Ormaza &lt;<a class="reference external" href="mailto:chris.ormaza&#64;forgeflow.com">chris.ormaza&#64;forgeflow.com</a>&gt;</li> <li>Christopher Ormaza &lt;<a class="reference external" href="mailto:chris.ormaza&#64;forgeflow.com">chris.ormaza&#64;forgeflow.com</a>&gt;</li>
<li>Akim Juillerat &lt;<a class="reference external" href="mailto:akim.juillerat&#64;camptocamp.com">akim.juillerat&#64;camptocamp.com</a>&gt;</li> <li>Akim Juillerat &lt;<a class="reference external" href="mailto:akim.juillerat&#64;camptocamp.com">akim.juillerat&#64;camptocamp.com</a>&gt;</li>
<li><a class="reference external" href="https://www.apsl.tech">APSL</a>:<ul>
<li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
</ul>
</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">

View File

@@ -8,15 +8,7 @@ from odoo.addons.mrp.tests.common import TestMrpCommon
class TestMrpWorkorderSequence(TestMrpCommon): class TestMrpWorkorderSequence(TestMrpCommon):
def setUp(self): @classmethod
super().setUp()
self._create_bom()
self.env["res.config.settings"].create(
{
"group_mrp_routings": True,
}
).execute()
def _create_bom(self): def _create_bom(self):
return self.env["mrp.bom"].create( return self.env["mrp.bom"].create(
{ {
@@ -114,6 +106,16 @@ class TestMrpWorkorderSequence(TestMrpCommon):
} }
) )
@classmethod
def setUpClass(cls):
super().setUpClass()
cls._create_bom()
cls.env["res.config.settings"].create(
{
"group_mrp_routings": True,
}
).execute()
def _create_order(self, product): def _create_order(self, product):
mrp_order_form = Form(self.env["mrp.production"]) mrp_order_form = Form(self.env["mrp.production"])
mrp_order_form.product_id = product mrp_order_form.product_id = product