mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 11:52:04 +02:00
Initial commit: Core packages
This commit is contained in:
commit
12c29a983b
9512 changed files with 8379910 additions and 0 deletions
27
odoo-bringout-oca-ocb-uom/uom/tests/common.py
Normal file
27
odoo-bringout-oca-ocb-uom/uom/tests/common.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.tests import TransactionCase
|
||||
|
||||
|
||||
class UomCommon(TransactionCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
cls.uom_gram = cls.env.ref('uom.product_uom_gram')
|
||||
cls.uom_kgm = cls.env.ref('uom.product_uom_kgm')
|
||||
cls.uom_ton = cls.env.ref('uom.product_uom_ton')
|
||||
cls.uom_unit = cls.env.ref('uom.product_uom_unit')
|
||||
cls.uom_dozen = cls.env.ref('uom.product_uom_dozen')
|
||||
|
||||
cls.group_uom = cls.env.ref('uom.group_uom')
|
||||
|
||||
@classmethod
|
||||
def _enable_uom(cls):
|
||||
cls.env.user.groups_id += cls.group_uom
|
||||
|
||||
@classmethod
|
||||
def _disable_uom(cls):
|
||||
cls.env.user.groups_id -= cls.group_uom
|
||||
Loading…
Add table
Add a link
Reference in a new issue