Skip to content

Commit

Permalink
[IMP] base_custom_info: Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tardo committed Dec 16, 2019
1 parent 238092d commit c75c14f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions base_custom_info/models/custom_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def _onchange_custom_info_template_id(self):
"res_id": self.id,
"value": prop.default_value,
})
newvalue._onchange_property_set_default_value()
newvalue._inverse_value()
newvalue._compute_value()
values += newvalue
Expand Down
2 changes: 2 additions & 0 deletions base_custom_info/tests/test_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from psycopg2 import IntegrityError
from odoo.exceptions import AccessError, ValidationError
from odoo.tests.common import TransactionCase
from odoo.tools import mute_logger


class PartnerCase(TransactionCase):
Expand Down Expand Up @@ -82,6 +83,7 @@ def test_template_model_and_model_id_match(self):
self.tpl.model = "res.users"
self.assertEqual(self.tpl.model, self.tpl.model_id.model)

@mute_logger('odoo.sql_db')
def test_template_model_must_exist(self):
"""Cannot create templates for unexisting models."""
with self.assertRaises(IntegrityError):
Expand Down

0 comments on commit c75c14f

Please sign in to comment.