diff --git a/partner_contact_birthdate/__manifest__.py b/partner_contact_birthdate/__manifest__.py index a8566aa2a..468dabeea 100644 --- a/partner_contact_birthdate/__manifest__.py +++ b/partner_contact_birthdate/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Contact's birthdate", - "version": "10.0.1.0.0", + "version": "10.0.1.1.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "category": "Customer Relationship Management", diff --git a/partner_contact_birthdate/models/res_partner.py b/partner_contact_birthdate/models/res_partner.py index 829771d11..d4ba59d70 100644 --- a/partner_contact_birthdate/models/res_partner.py +++ b/partner_contact_birthdate/models/res_partner.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2014-2015 Grupo ESOC # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import _, api, fields, models +from odoo import api, fields, models import logging @@ -30,9 +30,4 @@ class ResPartner(models.Model): @api.one def _birthdate_inverse(self): """Convert the old Char date to the new Date format.""" - try: - self.birthdate_date = self.birthdate - except ValueError: - _logger.warn( - _("Could not convert '{0.birthdate}' to date in " - "res.partner {0.id} ({0.name}). Skipping.").format(self)) + self.birthdate_date = self.birthdate diff --git a/partner_contact_birthdate/tests/test_birthdate.py b/partner_contact_birthdate/tests/test_birthdate.py index 7cfa2e695..7799ad6a0 100644 --- a/partner_contact_birthdate/tests/test_birthdate.py +++ b/partner_contact_birthdate/tests/test_birthdate.py @@ -28,12 +28,7 @@ class BadCase(TransactionCase): def setUp(self): super(BadCase, self).setUp() self.partner = self.env["res.partner"].create({"name": str(self)}) - self.birthdate = date.today() - - def tearDown(self): - self.assertNotEqual(self.partner.birthdate, - self.partner.birthdate_date) - super(BadCase, self).tearDown() def test_old_to_new(self): - self.partner.birthdate = "Not a date" + with self.assertRaises(ValueError): + self.partner.birthdate = "Not a date"