[FIX] sale_mrp, sale_mrp_margin: deduplicate tests

By inheriting from a test class that contains test methods, these tests
are executed twice.

closes odoo/odoo#150272

X-original-commit: 835f600eac6fd1ec202cd21876457b14d3d0af06
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
Christophe Monniez
2024-01-20 09:33:37 +00:00
parent 2c16088298
commit 8b8819c494
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -9,8 +9,7 @@ from odoo.addons.stock_account.tests.test_stockvaluation import _create_accounti
# these tests create accounting entries, and therefore need a chart of accounts
@common.tagged('post_install', '-at_install')
class TestSaleMrpFlow(ValuationReconciliationTestCommon):
class TestSaleMrpFlowCommon(ValuationReconciliationTestCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None):
@@ -237,6 +236,9 @@ class TestSaleMrpFlow(ValuationReconciliationTestCommon):
move_line.quantity = qty_to_process[comp][0]
move._action_done()
@common.tagged('post_install', '-at_install')
class TestSaleMrpFlow(TestSaleMrpFlowCommon):
def test_00_sale_mrp_flow(self):
""" Test sale to mrp flow with diffrent unit of measure."""
@@ -6,7 +6,7 @@ from odoo.tests import common, Form
@common.tagged('post_install', '-at_install')
class TestSaleMrpFlow(test_sale_mrp_flow.TestSaleMrpFlow):
class TestSaleMrpFlow(test_sale_mrp_flow.TestSaleMrpFlowCommon):
def test_kit_cost_calculation(self):
""" Check that the average cost price is computed correctly after SO confirmation: