[TMP] Test if date_start date_end is required and vice-versa

This commit is contained in:
michel 2018-01-16 19:23:33 +01:00
parent 5442ab5af3
commit 6bc231fd1e
1 changed files with 11 additions and 0 deletions

View File

@ -55,6 +55,17 @@ class TestGolemSeason(TransactionCase):
'date_start': '2009-11-01',
'date_end': '2011-12-31'})
with self.assertRaises(ValidationError):
self.season_model.create({'name': 'date_end is nul',
'date_start': '2009-11-01',
'date_end': False})
with self.assertRaises(ValidationError):
self.season_model.create({'name': 'date_start is nul',
'date_start' : False,
'date_end': '2009-11-01'})
def test__onchange_season_dates(self):
""" Test if membership date """
membership = self.env['product.template'].create({'name': 'Name',