Public release from ruodoo-project: 19.0 - 2026-09-20 21:17:41 UTC

This commit is contained in:
CI Publish Bot
2026-09-20 21:17:50 +00:00
commit ebd298dbf0
1234 changed files with 187334 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
from odoo.tests.common import TransactionCase
class TestHgIndexCode(TransactionCase):
def setUp(self):
super().setUp()
self.code = self.env['hg.index.code'].create({'name': 'Тестовый код'})
def test_create(self):
self.assertEqual(self.code.name, 'Тестовый код')
def test_index_ids_empty_on_create(self):
self.assertFalse(self.code.index_ids)
def test_index_linked_to_code(self):
index = self.env['hg.index'].create({
'name': 'Тестовый показатель',
'internal_code_id': self.code.id,
})
self.assertIn(index, self.code.index_ids)