mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-21 20:12:09 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
24
odoo-bringout-oca-brand-brand/brand/tests/common.py
Normal file
24
odoo-bringout-oca-brand-brand/brand/tests/common.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from odoo.tests import tagged
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class CommonCase(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
cls.brand_model = cls.env["res.brand"]
|
||||
cls.company_model = cls.env["res.company"]
|
||||
cls.partner_model = cls.env["res.partner"]
|
||||
|
||||
cls.company_no_brand = cls.company_model.create({"name": "No Brand Company"})
|
||||
cls.company_optional_brand = cls.company_model.create(
|
||||
{"name": "Optional Brand Company", "brand_use_level": "optional"}
|
||||
)
|
||||
cls.company_required_brand = cls.company_model.create(
|
||||
{"name": "Required Brand Company", "brand_use_level": "required"}
|
||||
)
|
||||
|
||||
cls.partner = cls.partner_model.create({"name": "Test Partner"})
|
||||
cls.brand = cls.brand_model.create({"partner_id": cls.partner.id})
|
||||
Loading…
Add table
Add a link
Reference in a new issue