mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
@@ -9,6 +9,16 @@ class TestLocationArchiveConstraint(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
# Remove this variable in v16 and put instead:
|
||||
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
||||
DISABLED_MAIL_CONTEXT = {
|
||||
"tracking_disable": True,
|
||||
"mail_create_nolog": True,
|
||||
"mail_create_nosubscribe": True,
|
||||
"mail_notrack": True,
|
||||
"no_reset_password": True,
|
||||
}
|
||||
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
||||
cls.env = cls.env(
|
||||
context=dict(cls.env.context, test_stock_archive_constraint=True)
|
||||
)
|
||||
|
||||
@@ -8,6 +8,16 @@ class TestStockLotFilterAvailable(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
# Remove this variable in v16 and put instead:
|
||||
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
||||
DISABLED_MAIL_CONTEXT = {
|
||||
"tracking_disable": True,
|
||||
"mail_create_nolog": True,
|
||||
"mail_create_nosubscribe": True,
|
||||
"mail_notrack": True,
|
||||
"no_reset_password": True,
|
||||
}
|
||||
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
||||
cls.StockProductionLot = cls.env["stock.production.lot"]
|
||||
cls.company = cls.env.ref("base.main_company")
|
||||
cls.loc = cls.env.ref("stock.stock_location_stock")
|
||||
|
||||
@@ -9,7 +9,16 @@ class TestsCommon(common.TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
# Remove this variable in v16 and put instead:
|
||||
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
||||
DISABLED_MAIL_CONTEXT = {
|
||||
"tracking_disable": True,
|
||||
"mail_create_nolog": True,
|
||||
"mail_create_nosubscribe": True,
|
||||
"mail_notrack": True,
|
||||
"no_reset_password": True,
|
||||
}
|
||||
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
||||
cls.location_obj = cls.env["stock.location"]
|
||||
product_obj = cls.env["product.product"]
|
||||
cls.wizard_obj = cls.env["wiz.stock.move.location"]
|
||||
|
||||
@@ -9,6 +9,16 @@ class TestStockPutawayRule(common.TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
# Remove this variable in v16 and put instead:
|
||||
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
||||
DISABLED_MAIL_CONTEXT = {
|
||||
"tracking_disable": True,
|
||||
"mail_create_nolog": True,
|
||||
"mail_create_nosubscribe": True,
|
||||
"mail_notrack": True,
|
||||
"no_reset_password": True,
|
||||
}
|
||||
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
||||
cls.putawayRuleObj = cls.env["stock.putaway.rule"]
|
||||
ProductTemplate = cls.env["product.template"]
|
||||
ProductAttribute = cls.env["product.attribute"]
|
||||
|
||||
@@ -7,13 +7,24 @@ from odoo.tests.common import TransactionCase, tagged
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestStockQuantCostInfo(TransactionCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
product_obj = self.env["product.product"]
|
||||
self.product_1 = product_obj.create(
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
# Remove this variable in v16 and put instead:
|
||||
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
||||
DISABLED_MAIL_CONTEXT = {
|
||||
"tracking_disable": True,
|
||||
"mail_create_nolog": True,
|
||||
"mail_create_nosubscribe": True,
|
||||
"mail_notrack": True,
|
||||
"no_reset_password": True,
|
||||
}
|
||||
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
||||
product_obj = cls.env["product.product"]
|
||||
cls.product_1 = product_obj.create(
|
||||
{"name": "product test 1", "type": "product", "standard_price": 1000}
|
||||
)
|
||||
self.product_2 = product_obj.create(
|
||||
cls.product_2 = product_obj.create(
|
||||
{"name": "product test 2", "type": "product", "standard_price": 2000}
|
||||
)
|
||||
|
||||
|
||||
@@ -8,6 +8,16 @@ class TestProductSecondaryUnit(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
# Remove this variable in v16 and put instead:
|
||||
# from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
||||
DISABLED_MAIL_CONTEXT = {
|
||||
"tracking_disable": True,
|
||||
"mail_create_nolog": True,
|
||||
"mail_create_nosubscribe": True,
|
||||
"mail_notrack": True,
|
||||
"no_reset_password": True,
|
||||
}
|
||||
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
||||
# Active multiple units of measure security group for user
|
||||
cls.env.user.groups_id = [(4, cls.env.ref("uom.group_uom").id)]
|
||||
cls.StockPicking = cls.env["stock.picking"]
|
||||
|
||||
Reference in New Issue
Block a user