summaryrefslogtreecommitdiff
path: root/odoo/addons/test_performance
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2020-05-19 10:29:16 +0200
committerMartin Trigaux <mat@odoo.com>2020-05-26 15:50:11 +0200
commit6db2a81ea2578615ccc17199dfc488745b2fc596 (patch)
tree0e0d8fc185987117922285f360b0728c5ae2cb95 /odoo/addons/test_performance
parent2f26eee981e6857fc0d9aeebe53ec85939bebfb2 (diff)
[IMP] *: use specific ir.property methods
Do not make direct CRUD to ir.property records, use appropriate methods for that
Diffstat (limited to 'odoo/addons/test_performance')
-rw-r--r--odoo/addons/test_performance/tests/test_performance.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/odoo/addons/test_performance/tests/test_performance.py b/odoo/addons/test_performance/tests/test_performance.py
index 104fce93195..01bab7187e2 100644
--- a/odoo/addons/test_performance/tests/test_performance.py
+++ b/odoo/addons/test_performance/tests/test_performance.py
@@ -485,12 +485,7 @@ class TestIrPropertyOptimizations(TransactionCase):
def test_with_truthy_default(self):
eggs = self.Eggs.create({})
- field = self.env['ir.model.fields']._get('test_performance.bacon', 'property_eggs')
- self.env['ir.property'].create({
- 'name': 'property_eggs_with_bacon',
- 'fields_id': field.id,
- 'value': eggs,
- })
+ self.env['ir.property']._set_default("property_eggs", "test_performance.bacon", eggs)
self.assertEqual(eggs, self.env['ir.property']._get('property_eggs', 'test_performance.bacon'))