Skip to content

Commit 15d9f4d

Browse files
committed
[IMP] Test for OLS03014
1 parent e586912 commit 15d9f4d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

server/tests/data/addons/module_1/models/diagnostics.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class ModelWithDiagnostics(models.Model):
1010
test_models = fields.One2many("pygls.tests.base_test_model", "diagnostics_id")
1111
date = fields.Date()
1212

13+
to_compute = fields.Integer(compute="_compute_field")
14+
1315
def a_method(self):
1416
self.env["module_2.empty_model"] # OLS03001
1517
self.env["non.existent.model"] # OLS03002
@@ -65,4 +67,9 @@ def test_search_domain(self):
6567
self.search([("date.millisecond_number", "=", 0)]) # OLS03012
6668

6769
self.search([("int_field.wrong_attr", "=", 0)]) # OLS03013
68-
self.search([("test_models.wrong_attr", "=", 0)]) # TODO, no diagnostic for that right now
70+
self.search([("test_models.wrong_attr", "=", 0)]) # OLS03011
71+
72+
@api.depends("int_field")
73+
@api.depends("wrong_field") # OLS03014
74+
def _compute_field(self):
75+
pass

0 commit comments

Comments
 (0)