Skip to content

Commit

Permalink
Merge PR #239 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Oct 24, 2023
2 parents b904ff0 + 80219e2 commit 7db95a4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ class TestProductSoldByDeliveryWeek(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.partner = cls.env["res.partner"].create(
{
"name": "Partner for testing",
Expand Down
10 changes: 10 additions & 0 deletions sale_report_delivered/tests/test_sale_report_delivered.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ class TestSaleReportDeliveredBase(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.company = cls.env.company
cls.pricelist = cls.env["product.pricelist"].create(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ class TestSaleReportDeliveredBrand(
@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.brand = cls.env["product.brand"].create({"name": "Test brand"})
cls.product.product_brand_id = cls.brand
cls.service.product_brand_id = cls.brand
Expand Down

0 comments on commit 7db95a4

Please sign in to comment.