Browse Source

migration to 11.0

pull/696/head
Jordi Ballester 7 years ago
committed by Nikul-Chaudhary
parent
commit
1099b19fbe
  1. 2
      partner_second_lastname/README.rst
  2. 4
      partner_second_lastname/__manifest__.py
  3. 19
      partner_second_lastname/i18n/de.po
  4. 21
      partner_second_lastname/i18n/es.po
  5. 24
      partner_second_lastname/i18n/fr.po
  6. 19
      partner_second_lastname/i18n/hr_HR.po
  7. 19
      partner_second_lastname/i18n/it.po
  8. 19
      partner_second_lastname/i18n/nl.po
  9. 21
      partner_second_lastname/i18n/nl_NL.po
  10. 19
      partner_second_lastname/i18n/sl.po
  11. 2
      partner_second_lastname/models/__init__.py
  12. 6
      partner_second_lastname/models/res_config_settings.py
  13. 8
      partner_second_lastname/models/res_partner.py
  14. 8
      partner_second_lastname/tests/test_config.py
  15. 22
      partner_second_lastname/tests/test_name.py
  16. 40
      partner_second_lastname/tests/test_onchange.py

2
partner_second_lastname/README.rst

@ -53,7 +53,7 @@ you easily in some corner cases.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/134/10.0
:target: https://runbot.odoo-community.org/runbot/134/11.0
Known issues / Roadmap

4
partner_second_lastname/__manifest__.py

@ -2,12 +2,12 @@
# Copyright 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# Copyright 2015 Antiun Ingenieria S.L. - Antonio Espinosa
# Copyright 2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Partner second last name",
"summary": "Have split first and second lastnames",
"version": "10.0.1.0.0",
"version": "11.0.1.0.0",
"license": "AGPL-3",
"website": "https://www.tecnativa.com",
"author": "Tecnativa, "

19
partner_second_lastname/i18n/de.po

@ -3,14 +3,14 @@
# * partner_second_lastname
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# OCA Transbot <transbot@odoo-community.org>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 02:49+0000\n"
"PO-Revision-Date: 2017-06-30 02:49+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"POT-Creation-Date: 2018-01-03 20:26+0000\n"
"PO-Revision-Date: 2018-01-03 20:26+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -20,17 +20,16 @@ msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_res_partner
msgid "Partner"
msgstr "Partner"
msgid "Contact"
msgstr "Kontakt"
#. module: partner_second_lastname
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_alias_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_users_lastname2
msgid "Second last name"
msgstr "Zweiter Nachname"
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_base_config_settings
msgid "base.config.settings"
#: model:ir.model,name:partner_second_lastname.model_res_config_settings
msgid "res.config.settings"
msgstr ""

21
partner_second_lastname/i18n/es.po

@ -3,14 +3,14 @@
# * partner_second_lastname
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# OCA Transbot <transbot@odoo-community.org>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 02:49+0000\n"
"PO-Revision-Date: 2017-06-30 02:49+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"POT-Creation-Date: 2018-01-03 20:26+0000\n"
"PO-Revision-Date: 2018-01-03 20:26+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -20,17 +20,16 @@ msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_res_partner
msgid "Partner"
msgstr "Empresa"
msgid "Contact"
msgstr "Contacto"
#. module: partner_second_lastname
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_alias_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_users_lastname2
msgid "Second last name"
msgstr "Segundo apellido"
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_base_config_settings
msgid "base.config.settings"
msgstr "base.config.settings"
#: model:ir.model,name:partner_second_lastname.model_res_config_settings
msgid "res.config.settings"
msgstr "res.config.settings"

24
partner_second_lastname/i18n/fr.po

@ -3,14 +3,15 @@
# * partner_second_lastname
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Nicolas JEUDY <njeudy@panda-chi.io>, 2018
# OCA Transbot <transbot@odoo-community.org>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 02:49+0000\n"
"PO-Revision-Date: 2017-06-30 02:49+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"POT-Creation-Date: 2018-01-03 20:26+0000\n"
"PO-Revision-Date: 2018-01-03 20:26+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -20,17 +21,16 @@ msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_res_partner
msgid "Partner"
msgstr "Partenaire"
msgid "Contact"
msgstr "Contact"
#. module: partner_second_lastname
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_alias_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_users_lastname2
msgid "Second last name"
msgstr ""
msgstr "Deuxième nom"
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_base_config_settings
msgid "base.config.settings"
msgstr ""
#: model:ir.model,name:partner_second_lastname.model_res_config_settings
msgid "res.config.settings"
msgstr "res.config.settings"

19
partner_second_lastname/i18n/hr_HR.po

@ -3,14 +3,14 @@
# * partner_second_lastname
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# OCA Transbot <transbot@odoo-community.org>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 02:49+0000\n"
"PO-Revision-Date: 2017-06-30 02:49+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"POT-Creation-Date: 2018-01-03 20:26+0000\n"
"PO-Revision-Date: 2018-01-03 20:26+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -20,17 +20,16 @@ msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_res_partner
msgid "Partner"
msgstr "Partner"
msgid "Contact"
msgstr "Kontakt"
#. module: partner_second_lastname
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_alias_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_users_lastname2
msgid "Second last name"
msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_base_config_settings
msgid "base.config.settings"
#: model:ir.model,name:partner_second_lastname.model_res_config_settings
msgid "res.config.settings"
msgstr ""

19
partner_second_lastname/i18n/it.po

@ -3,14 +3,14 @@
# * partner_second_lastname
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# OCA Transbot <transbot@odoo-community.org>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 02:49+0000\n"
"PO-Revision-Date: 2017-06-30 02:49+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"POT-Creation-Date: 2018-01-03 20:26+0000\n"
"PO-Revision-Date: 2018-01-03 20:26+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -20,17 +20,16 @@ msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_res_partner
msgid "Partner"
msgstr "Partner"
msgid "Contact"
msgstr "Contatto"
#. module: partner_second_lastname
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_alias_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_users_lastname2
msgid "Second last name"
msgstr "Secondo cognome"
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_base_config_settings
msgid "base.config.settings"
#: model:ir.model,name:partner_second_lastname.model_res_config_settings
msgid "res.config.settings"
msgstr ""

19
partner_second_lastname/i18n/nl.po

@ -3,14 +3,14 @@
# * partner_second_lastname
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# OCA Transbot <transbot@odoo-community.org>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 02:49+0000\n"
"PO-Revision-Date: 2017-06-30 02:49+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"POT-Creation-Date: 2018-01-03 20:26+0000\n"
"PO-Revision-Date: 2018-01-03 20:26+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -20,17 +20,16 @@ msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_res_partner
msgid "Partner"
msgstr "Relatie"
msgid "Contact"
msgstr "Contact"
#. module: partner_second_lastname
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_alias_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_users_lastname2
msgid "Second last name"
msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_base_config_settings
msgid "base.config.settings"
#: model:ir.model,name:partner_second_lastname.model_res_config_settings
msgid "res.config.settings"
msgstr ""

21
partner_second_lastname/i18n/nl_NL.po

@ -3,14 +3,14 @@
# * partner_second_lastname
#
# Translators:
# Peter Hageman <hageman.p@gmail.com>, 2017
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 02:49+0000\n"
"PO-Revision-Date: 2017-06-30 02:49+0000\n"
"Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n"
"POT-Creation-Date: 2017-11-22 03:38+0000\n"
"PO-Revision-Date: 2017-11-22 03:38+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -20,17 +20,16 @@ msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_res_partner
msgid "Partner"
msgstr "Relatie"
msgid "Contact"
msgstr ""
#. module: partner_second_lastname
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_alias_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_users_lastname2
msgid "Second last name"
msgstr "Tweede achternaam"
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_base_config_settings
msgid "base.config.settings"
msgstr "base.config.settings"
#: model:ir.model,name:partner_second_lastname.model_res_config_settings
msgid "res.config.settings"
msgstr "res.config.settings"

19
partner_second_lastname/i18n/sl.po

@ -3,14 +3,14 @@
# * partner_second_lastname
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# OCA Transbot <transbot@odoo-community.org>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 02:49+0000\n"
"PO-Revision-Date: 2017-06-30 02:49+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"POT-Creation-Date: 2018-01-03 20:26+0000\n"
"PO-Revision-Date: 2018-01-03 20:26+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -20,17 +20,16 @@ msgstr ""
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_res_partner
msgid "Partner"
msgstr "Partner"
msgid "Contact"
msgstr "Stik"
#. module: partner_second_lastname
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_alias_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_partner_lastname2
#: model:ir.model.fields,field_description:partner_second_lastname.field_res_users_lastname2
msgid "Second last name"
msgstr "Drugi priimek"
#. module: partner_second_lastname
#: model:ir.model,name:partner_second_lastname.model_base_config_settings
msgid "base.config.settings"
#: model:ir.model,name:partner_second_lastname.model_res_config_settings
msgid "res.config.settings"
msgstr ""

2
partner_second_lastname/models/__init__.py

@ -2,5 +2,5 @@
# © 2015 Antiun Ingenieria S.L. - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import base_config_settings
from . import res_config_settings
from . import res_partner

6
partner_second_lastname/models/base_config_settings.py → partner_second_lastname/models/res_config_settings.py

@ -5,12 +5,12 @@
from odoo import models, api
class BaseConfigSettings(models.TransientModel):
_inherit = 'base.config.settings'
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
def _partner_names_order_selection(self):
options = super(
BaseConfigSettings, self)._partner_names_order_selection()
ResConfigSettings, self)._partner_names_order_selection()
new_labels = {
'last_first': 'Lastname SecondLastname Firstname',
'last_first_comma': 'Lastname SecondLastname, Firstname',

8
partner_second_lastname/models/res_partner.py

@ -39,7 +39,7 @@ class ResPartner(models.Model):
names[-1] = names[-1] + ","
if firstname:
names.append(firstname)
return u" ".join(names)
return " ".join(names)
@api.depends("firstname", "lastname", "lastname2")
def _compute_name(self):
@ -55,11 +55,11 @@ class ResPartner(models.Model):
parts = self._get_inverse_name(self.name, self.is_company)
# Avoid to hit :meth:`~._check_name` with all 3 fields being ``False``
before, after = {}, {}
for key, value in parts.iteritems():
for key, value in parts.items():
(before if value else after)[key] = value
if any([before[k] != self[k] for k in before.keys()]):
if any([before[k] != self[k] for k in list(before.keys())]):
self.update(before)
if any([after[k] != self[k] for k in after.keys()]):
if any([after[k] != self[k] for k in list(after.keys())]):
self.update(after)
@api.model

8
partner_second_lastname/tests/test_config.py

@ -9,7 +9,7 @@ class TestConfig(common.SavepointCase):
@classmethod
def setUpClass(cls):
super(TestConfig, cls).setUpClass()
cls.wizard = cls.env['base.config.settings'].create({})
cls.wizard = cls.env['res.config.settings'].create({})
cls.partner = cls.env['res.partner'].create({
'firstname': "First",
'lastname': "Last",
@ -18,18 +18,18 @@ class TestConfig(common.SavepointCase):
def test_last_first(self):
self.wizard.partner_names_order = 'last_first'
self.wizard.set_partner_names_order()
self.wizard.set_values()
self.wizard.action_recalculate_partners_name()
self.assertEqual(self.partner.name, "Last Second First")
def test_last_first_comma(self):
self.wizard.partner_names_order = 'last_first_comma'
self.wizard.set_partner_names_order()
self.wizard.set_values()
self.wizard.action_recalculate_partners_name()
self.assertEqual(self.partner.name, "Last Second, First")
def test_first_last(self):
self.wizard.partner_names_order = 'first_last'
self.wizard.set_partner_names_order()
self.wizard.set_values()
self.wizard.action_recalculate_partners_name()
self.assertEqual(self.partner.name, "First Last Second")

22
partner_second_lastname/tests/test_name.py

@ -22,7 +22,7 @@ class CompanyCase(TransactionCase):
})
# Name should be cleaned of unneeded whitespace
clean_name = u" ".join(self.name.split(None))
clean_name = " ".join(self.name.split(None))
# Check it's saved OK
self.assertEqual(
@ -51,27 +51,27 @@ class CompanyCase(TransactionCase):
def test_long_name(self):
"""Create a company with a long name."""
self.name = u"Söme very lóng nâme"
self.name = "Söme very lóng nâme"
def test_short_name(self):
"""Create a company with a short name."""
self.name = u"Shoŕt"
self.name = "Shoŕt"
def test_whitespace_before(self):
"""Create a company with name prefixed with whitespace."""
self.name = u" Wĥitespace befòre"
self.name = " Wĥitespace befòre"
def test_whitespace_after(self):
"""Create a company with name suffixed with whitespace."""
self.name = u"Whitespâce aftér "
self.name = "Whitespâce aftér "
def test_whitespace_inside(self):
"""Create a company with whitespace inside the name."""
self.name = u"Whitespacé ïnside"
self.name = "Whitespacé ïnside"
def test_whitespace_everywhere(self):
"""Create a company with whitespace everywhere in the name."""
self.name = u" A lot öf whitespace "
self.name = " A lot öf whitespace "
class PersonCase(TransactionCase):
@ -84,10 +84,10 @@ class PersonCase(TransactionCase):
self.env['ir.config_parameter'].set_param(
'partner_names_order', 'last_first_comma')
self.firstname = u"Fírstname"
self.lastname = u"Làstname1"
self.lastname2 = u"Lâstname2"
self.template = u"%(last1)s %(last2)s, %(first)s"
self.firstname = "Fírstname"
self.lastname = "Làstname1"
self.lastname2 = "Lâstname2"
self.template = "%(last1)s %(last2)s, %(first)s"
def tearDown(self):
try:

40
partner_second_lastname/tests/test_onchange.py

@ -46,7 +46,7 @@ class PartnerCompanyCase(OnChangeCase):
def test_create_from_form(self):
"""A user creates a company from the form."""
name = u"Sôme company"
name = "Sôme company"
with self.env.do_in_onchange():
# User presses ``new``
self.partner = self.new_partner()
@ -66,8 +66,8 @@ class PartnerCompanyCase(OnChangeCase):
self.partner = self.new_partner()
# User changes fields
self.set_name(u"Fóo")
self.set_name(u"")
self.set_name("Fóo")
self.set_name("")
self.assertEqual(self.partner.lastname, False)
@ -107,11 +107,11 @@ class PartnerContactCase(OnChangeCase):
self.assertEqual(self.partner.lastname2, False)
# ``name`` cannot be False, or upstream Odoo will fail
self.assertEqual(self.partner.name, u"")
self.assertEqual(self.partner.name, "")
def test_create_from_form_only_firstname(self):
"""A user creates a contact with only the firstname from the form."""
firstname = u"Fïrst"
firstname = "Fïrst"
with self.env.do_in_onchange():
# User presses ``new``
self.partner = self.new_partner()
@ -125,7 +125,7 @@ class PartnerContactCase(OnChangeCase):
def test_create_from_form_only_lastname(self):
"""A user creates a contact with only the lastname from the form."""
lastname = u"Läst"
lastname = "Läst"
with self.env.do_in_onchange():
# User presses ``new``
self.partner = self.new_partner()
@ -139,7 +139,7 @@ class PartnerContactCase(OnChangeCase):
def test_create_from_form_only_lastname2(self):
"""A user creates a contact with only the lastname2 from the form."""
lastname2 = u"Läst2"
lastname2 = "Läst2"
with self.env.do_in_onchange():
# User presses ``new``
self.partner = self.new_partner()
@ -153,8 +153,8 @@ class PartnerContactCase(OnChangeCase):
def test_create_from_without_firstname(self):
"""A user creates a contact without firstname from the form."""
lastname = u"Läst"
lastname2 = u"Läst2"
lastname = "Läst"
lastname2 = "Läst2"
with self.env.do_in_onchange():
# User presses ``new``
self.partner = self.new_partner()
@ -166,12 +166,12 @@ class PartnerContactCase(OnChangeCase):
self.assertEqual(self.partner.firstname, False)
self.assertEqual(
self.partner.name,
u"%s %s" % (lastname, lastname2))
"%s %s" % (lastname, lastname2))
def test_create_from_without_lastname(self):
"""A user creates a contact without lastname from the form."""
firstname = u"Fïrst"
lastname2 = u"Läst2"
firstname = "Fïrst"
lastname2 = "Läst2"
with self.env.do_in_onchange():
# User presses ``new``
self.partner = self.new_partner()
@ -183,12 +183,12 @@ class PartnerContactCase(OnChangeCase):
self.assertEqual(self.partner.lastname, False)
self.assertEqual(
self.partner.name,
u"%s, %s" % (lastname2, firstname))
"%s, %s" % (lastname2, firstname))
def test_create_from_without_lastname2(self):
"""A user creates a contact without lastname2 from the form."""
firstname = u"Fïrst"
lastname = u"Läst"
firstname = "Fïrst"
lastname = "Läst"
with self.env.do_in_onchange():
# User presses ``new``
self.partner = self.new_partner()
@ -200,13 +200,13 @@ class PartnerContactCase(OnChangeCase):
self.assertEqual(self.partner.lastname2, False)
self.assertEqual(
self.partner.name,
u"%s, %s" % (lastname, firstname))
"%s, %s" % (lastname, firstname))
def test_create_from_form_all(self):
"""A user creates a contact with all names from the form."""
firstname = u"Fïrst"
lastname = u"Läst"
lastname2 = u"Läst2"
firstname = "Fïrst"
lastname = "Läst"
lastname2 = "Läst2"
with self.env.do_in_onchange():
# User presses ``new``
self.partner = self.new_partner()
@ -218,4 +218,4 @@ class PartnerContactCase(OnChangeCase):
self.assertEqual(
self.partner.name,
u"%s %s, %s" % (lastname, lastname2, firstname))
"%s %s, %s" % (lastname, lastname2, firstname))
Loading…
Cancel
Save