Files
stock-logistics-warehouse/product_packaging_usability/tests/test_module.py
2023-11-15 12:15:23 +01:00

21 lines
661 B
Python

from odoo.tests.common import TransactionCase
class Test(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
def test_action(self):
product = self.env.ref("product.product_product_6")
packaging = self.env["product.packaging"].create(
{"name": "any", "product_id": product.id, "qty": 10}
)
action = packaging.ui_goto_packaging_view()
self.assertIn(
"search_default_product_id",
action["context"],
"Missing key 'search_default_product_id'",
)