mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-21 06:52:03 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
|
|
@ -1,27 +1,29 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.tests import TransactionCase
|
||||
from odoo.addons.base.tests.common import BaseCommon
|
||||
|
||||
|
||||
class UomCommon(TransactionCase):
|
||||
class UomCommon(BaseCommon):
|
||||
|
||||
@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.uom_gram = cls.quick_ref('uom.product_uom_gram')
|
||||
cls.uom_kgm = cls.quick_ref('uom.product_uom_kgm')
|
||||
cls.uom_ton = cls.quick_ref('uom.product_uom_ton')
|
||||
cls.uom_unit = cls.quick_ref('uom.product_uom_unit')
|
||||
cls.uom_dozen = cls.quick_ref('uom.product_uom_dozen')
|
||||
cls.uom_dozen.active = True
|
||||
cls.uom_hour = cls.quick_ref('uom.product_uom_hour')
|
||||
|
||||
cls.group_uom = cls.env.ref('uom.group_uom')
|
||||
cls.group_uom = cls.quick_ref('uom.group_uom')
|
||||
|
||||
@classmethod
|
||||
def _enable_uom(cls):
|
||||
cls.env.user.groups_id += cls.group_uom
|
||||
cls.env.user.group_ids += cls.group_uom
|
||||
|
||||
@classmethod
|
||||
def _disable_uom(cls):
|
||||
cls.env.user.groups_id -= cls.group_uom
|
||||
cls.env.user.group_ids -= cls.group_uom
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue