Browse Source

Merge branch 'fix-154' into fix_bug_154

pull/200/head
eLBati 9 years ago
parent
commit
5acea1e33b
  1. 2
      README.md
  2. 2
      partner_contact_birthdate/tests/__init__.py
  3. 27
      partner_contact_birthdate/tests/test_delete.py
  4. 5
      partner_firstname/__openerp__.py
  5. 9
      partner_firstname/tests/__init__.py
  6. 38
      partner_firstname/tests/test_delete.py

2
README.md

@ -35,7 +35,7 @@ addon | version | summary
[partner_contact_nationality](partner_contact_nationality/) | 8.0.1.0.0 | Contact's nationality [partner_contact_nationality](partner_contact_nationality/) | 8.0.1.0.0 | Contact's nationality
[partner_contact_personal_information_page](partner_contact_personal_information_page/) | 8.0.1.0.0 | Add a page to contacts form to put personal information [partner_contact_personal_information_page](partner_contact_personal_information_page/) | 8.0.1.0.0 | Add a page to contacts form to put personal information
[partner_external_maps](partner_external_maps/) | 8.0.0.1.0 | Add Map and Map Routing buttons on partner form to open GMaps, OSM, Bing and others [partner_external_maps](partner_external_maps/) | 8.0.0.1.0 | Add Map and Map Routing buttons on partner form to open GMaps, OSM, Bing and others
[partner_firstname](partner_firstname/) | 8.0.2.0.0 | Split first name and last name for non company partners
[partner_firstname](partner_firstname/) | 8.0.2.0.1 | Split first name and last name for non company partners
[partner_helper](partner_helper/) | 8.0.0.1.0 | Partner Helper [partner_helper](partner_helper/) | 8.0.0.1.0 | Partner Helper
[partner_relations](partner_relations/) | 8.0.1.1.0 | Partner relations [partner_relations](partner_relations/) | 8.0.1.1.0 | Partner relations
[partner_second_lastname](partner_second_lastname/) | 8.0.4.0.0 | Partner second last name [partner_second_lastname](partner_second_lastname/) | 8.0.4.0.0 | Partner second last name

2
partner_contact_birthdate/tests/__init__.py

@ -16,4 +16,4 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import test_birthdate
from . import test_birthdate, test_delete

27
partner_contact_birthdate/tests/test_delete.py

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
class CompanyCase(TransactionCase):
model = "res.partner"
context = {"default_is_company": True}
def test_computing_after_unlink(self):
"""Test what happens if recomputed after unlinking.
This test might seem useless, but really this happens when module
``partner_relations`` is installed.
See https://github.com/OCA/partner-contact/issues/154.
"""
data = {"name": u"Söme name", "birthdate": "2015-09-28"}
record = self.env[self.model].with_context(**self.context).create(data)
record.unlink()
record.recompute()
class PersonCase(CompanyCase):
context = {"default_is_company": False}

5
partner_firstname/__openerp__.py

@ -21,12 +21,13 @@
{ {
'name': 'Partner first name and last name', 'name': 'Partner first name and last name',
'summary': "Split first name and last name for non company partners", 'summary': "Split first name and last name for non company partners",
'version': '8.0.2.0.1',
'version': '8.0.2.1.0',
'author': "Camptocamp, Grupo ESOC, Odoo Community Association (OCA)", 'author': "Camptocamp, Grupo ESOC, Odoo Community Association (OCA)",
"license": "AGPL-3", "license": "AGPL-3",
'maintainer': 'Camptocamp, Acsone', 'maintainer': 'Camptocamp, Acsone',
'category': 'Extra Tools', 'category': 'Extra Tools',
'website': 'http://www.camptocamp.com, http://www.acsone.eu',
'website':
'http://www.camptocamp.com, http://www.acsone.eu, http://grupoesoc.es',
'depends': ['base'], 'depends': ['base'],
'data': [ 'data': [
'views/res_partner.xml', 'views/res_partner.xml',

9
partner_firstname/tests/__init__.py

@ -29,4 +29,11 @@
# #
############################################################################## ##############################################################################
from . import test_create, test_defaults, test_empty, test_name, test_onchange
from . import (
test_create,
test_delete,
test_defaults,
test_empty,
test_name,
test_onchange
)

38
partner_firstname/tests/test_delete.py

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
from .base import MailInstalled
class CompanyCase(TransactionCase):
model = "res.partner"
context = {"default_is_company": True}
def test_computing_after_unlink(self):
"""Test what happens if recomputed after unlinking.
This test might seem useless, but really this happens when module
``partner_relations`` is installed.
See https://github.com/OCA/partner-contact/issues/154.
"""
data = {"name": u"Söme name"}
record = self.env[self.model].with_context(**self.context).create(data)
record.unlink()
record.recompute()
class PersonCase(CompanyCase):
context = {"default_is_company": False}
class UserCase(CompanyCase, MailInstalled):
model = "res.users"
context = {"default_login": "user@example.com"}
def test_computing_after_unlink(self):
# Cannot create users if ``mail`` is installed
if not self.mail_installed():
super(UserCase, self).test_computing_after_unlink()
Loading…
Cancel
Save