I create some product categories in SetUp method for my unit tests:
self.product_category1 = self.env['product.category'].create({Then I try to access the parent_left / parent_right fields either directly on self.product_category1.parent_left, or with a self.env['product_category'].browse(self.product_category1.id).parent_left, but the fields value is always 0. The same problem exists with partner tags hierarchy.
'name': 'Product Category 1', }) self.product_category1_1 = self.env['product.category'].create({ 'name': 'Product Category 1.1', 'parent_id': self.product_category1.id, )
These are my first steps with unit tests on newest API so I am not sure if there is a bug or if I make something wrong.