diff --git a/partner_firstname/README.rst b/partner_firstname/README.rst index 9b19f4499..dca4da88b 100644 --- a/partner_firstname/README.rst +++ b/partner_firstname/README.rst @@ -1,14 +1,38 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - ================================ Partner first name and last name ================================ +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github + :target: https://github.com/OCA/partner-contact/tree/12.0/partner_firstname + :alt: OCA/partner-contact +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_firstname + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/134/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This module was written to extend the functionality of contacts to support having separate last name and first name. +**Table of contents** + +.. contents:: + :local: + Configuration ============= @@ -27,7 +51,6 @@ You can use *_get_inverse_name* method to get lastname and firstname from a simp and also *_get_computed_name* to get a name form the lastname and firstname. These methods can be overridden to change the format specified above. - Usage ===== @@ -45,15 +68,6 @@ For the same reason, after installing, previous names for contacts will stay in the *name* field, and the first time you edit any of them you will be asked to supply the *last name* and *first name* (just once per contact). -.. 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/11.0 - -For further information, please visit: - -* https://www.odoo.com/forum/help-1 - - Known issues / Roadmap ====================== @@ -61,20 +75,30 @@ Patterns for the inverse function are configurable only at system level. Maybe this configuration could depend on partner language, country or company, as discussed at `this OCA issue `_ - Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Camptocamp +* Grupo ESOC Ingeniería de Servicios +* Tecnativa +* LasLabs +* ACSONE SA/NV + Contributors ------------- +~~~~~~~~~~~~ * Nicolas Bessi * Yannick Vaucher @@ -93,26 +117,21 @@ Contributors * Sylvain Van Hoof * Pedro Baeza * Dave Lasley +* Graeme Gellatly -Translations ------------- +Maintainers +~~~~~~~~~~~ -* Danish: Hans Henrik Gabelgaard -* Italian: Leonardo Donelli -* Spanish: Antonio Espinosa -* Antonio Espinosa - -Maintainer ----------- +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/partner-contact `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_firstname/__init__.py b/partner_firstname/__init__.py index b3bc449ef..cc6b6354a 100644 --- a/partner_firstname/__init__.py +++ b/partner_firstname/__init__.py @@ -1,6 +1,2 @@ -# -*- coding: utf-8 -*- -# © 2013 Nicolas Bessi (Camptocamp SA) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - from . import models from .hooks import post_init_hook diff --git a/partner_firstname/__manifest__.py b/partner_firstname/__manifest__.py index 1b3e52fb8..9ca5d0c3c 100644 --- a/partner_firstname/__manifest__.py +++ b/partner_firstname/__manifest__.py @@ -1,13 +1,12 @@ -# -*- coding: utf-8 -*- -# © 2013 Nicolas Bessi (Camptocamp SA) -# © 2014 Agile Business Group () -# © 2015 Grupo ESOC () +# Copyright 2013 Nicolas Bessi (Camptocamp SA) +# Copyright 2014 Agile Business Group () +# Copyright 2015 Grupo ESOC () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Partner first name and last name', 'summary': "Split first name and last name for non company partners", - 'version': '11.0.1.0.1', + 'version': '12.0.1.0.0', 'author': "Camptocamp, " "Grupo ESOC Ingeniería de Servicios, " "Tecnativa, " diff --git a/partner_firstname/exceptions.py b/partner_firstname/exceptions.py index 4714b7001..882ad7a42 100644 --- a/partner_firstname/exceptions.py +++ b/partner_firstname/exceptions.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2014-2015 Grupo ESOC () +# Copyright 2014-2015 Grupo ESOC () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import _, exceptions diff --git a/partner_firstname/hooks.py b/partner_firstname/hooks.py index 64c0b7a9f..1ea80d0c6 100644 --- a/partner_firstname/hooks.py +++ b/partner_firstname/hooks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/partner_firstname/migrations/12.0.1.0.0/pre-ir_config_param.py b/partner_firstname/migrations/12.0.1.0.0/pre-ir_config_param.py new file mode 100644 index 000000000..7befc7814 --- /dev/null +++ b/partner_firstname/migrations/12.0.1.0.0/pre-ir_config_param.py @@ -0,0 +1,14 @@ +def store_ir_config_param(cr): + """Prior to version 12.0 the default order of partner + names was last_first. In order to retain this behaviour we + store the config parameter if it is not present. + """ + cr.execute("SELECT 1 FROM ir_config_parameter " + "WHERE name = 'partner_names_order'") + if not cr.fetchone(): + cr.execute("INSERT INTO ir_config_parameter (key, value) VALUES " + "('partner_names_order', 'last_first')") + + +def migrate(cr, version): + store_ir_config_param(cr) diff --git a/partner_firstname/models/__init__.py b/partner_firstname/models/__init__.py index 05e809bb7..9109246cb 100644 --- a/partner_firstname/models/__init__.py +++ b/partner_firstname/models/__init__.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# © 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_partner from . import res_users diff --git a/partner_firstname/models/base_config_settings.py b/partner_firstname/models/base_config_settings.py index 7d7a98a43..231b92bca 100644 --- a/partner_firstname/models/base_config_settings.py +++ b/partner_firstname/models/base_config_settings.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2015 Antiun Ingenieria S.L. - Antonio Espinosa +# Copyright 2015 Antiun Ingenieria S.L. - Antonio Espinosa # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging @@ -73,6 +72,9 @@ class ResConfigSettings(models.TransientModel): @api.multi def action_recalculate_partners_name(self): + self.env['ir.config_parameter'].sudo().set_param( + 'partner_names_order', self.partner_names_order + ) partners = self._partners_for_recalculating() _logger.info("Recalculating names for %d partners.", len(partners)) partners._compute_name() diff --git a/partner_firstname/models/res_partner.py b/partner_firstname/models/res_partner.py index 359a13336..7ad372d01 100644 --- a/partner_firstname/models/res_partner.py +++ b/partner_firstname/models/res_partner.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- -# © 2013 Nicolas Bessi (Camptocamp SA) -# © 2014 Agile Business Group () -# © 2015 Grupo ESOC () +# Copyright 2013 Nicolas Bessi (Camptocamp SA) +# Copyright 2014 Agile Business Group () +# Copyright 2015 Grupo ESOC () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging from odoo import api, fields, models @@ -40,7 +39,6 @@ class ResPartner(models.Model): self._get_whitespace_cleaned_name(name), vals.get("is_company", self.default_get(["is_company"])["is_company"])) - for key, value in inverted.items(): if not vals.get(key) or context.get("copy"): vals[key] = value @@ -80,7 +78,7 @@ class ResPartner(models.Model): @api.model def _names_order_default(self): - return 'last_first' + return 'first_last' @api.model def _get_names_order(self): diff --git a/partner_firstname/models/res_users.py b/partner_firstname/models/res_users.py index e5d0198b3..2522bfa75 100644 --- a/partner_firstname/models/res_users.py +++ b/partner_firstname/models/res_users.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- -# © 2013 Nicolas Bessi (Camptocamp SA) -# © 2014 Agile Business Group () -# © 2015 Grupo ESOC () +# Copyright 2013 Nicolas Bessi (Camptocamp SA) +# Copyright 2014 Agile Business Group () +# Copyright 2015 Grupo ESOC () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, models, _ @@ -32,14 +31,19 @@ class ResUser(models.Model): rec.name = rec.partner_id._get_computed_name( rec.lastname, rec.firstname) - @api.multi + @api.model def copy(self, default=None): self.ensure_one() default = dict(default or {}) - if ('name' not in default) and ('partner_id' not in default): + if (('name' not in default) and + ('partner_id' not in default)): default['name'] = _("%s (copy)") % self.name if 'login' not in default: default['login'] = _("%s (copy)") % self.login - if ('firstname' not in default) and ('lastname' not in default) and ('name' in default): - default.update(self.env['res.partner']._get_inverse_name(default['name'], False)) + if (('firstname' not in default) and + ('lastname' not in default) and + ('name' in default)): + default.update(self.env['res.partner']._get_inverse_name( + default['name'], False) + ) return super(ResUser, self).copy(default) diff --git a/partner_firstname/readme/CONFIGURE.rst b/partner_firstname/readme/CONFIGURE.rst new file mode 100644 index 000000000..6d2c295de --- /dev/null +++ b/partner_firstname/readme/CONFIGURE.rst @@ -0,0 +1,14 @@ +You can configure some common name patterns for the inverse function +in Settings > General settings: + +* Lastname Firstname: For example 'Anderson Robert' +* Lastname, Firstname: For example 'Anderson, Robert' +* Firstname Lastname: For example 'Robert Anderson' + +After applying the changes, you can recalculate all partners name clicking +"Recalculate names" button. Note: This process could take so much time depending +how many partners there are in database. + +You can use *_get_inverse_name* method to get lastname and firstname from a simple string +and also *_get_computed_name* to get a name form the lastname and firstname. +These methods can be overridden to change the format specified above. diff --git a/partner_firstname/readme/CONTRIBUTORS.rst b/partner_firstname/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..09ee264df --- /dev/null +++ b/partner_firstname/readme/CONTRIBUTORS.rst @@ -0,0 +1,18 @@ +* Nicolas Bessi +* Yannick Vaucher +* Vincent Renaville +* Guewen Baconnier +* Holger Brunn +* Jonathan Nemry +* Olivier Laurent +* Sandy Carter +* Alexis de Lattre +* Lorenzo Battistini +* Hans Henrik Gabelgaard +* Jairo Llopis +* Adrien Peiffer +* Ronald Portier +* Sylvain Van Hoof +* Pedro Baeza +* Dave Lasley +* Graeme Gellatly diff --git a/partner_firstname/readme/DESCRIPTION.rst b/partner_firstname/readme/DESCRIPTION.rst new file mode 100644 index 000000000..5031ba9b2 --- /dev/null +++ b/partner_firstname/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module was written to extend the functionality of contacts to support +having separate last name and first name. diff --git a/partner_firstname/readme/ROADMAP.rst b/partner_firstname/readme/ROADMAP.rst new file mode 100644 index 000000000..decdf438f --- /dev/null +++ b/partner_firstname/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +Patterns for the inverse function are configurable only at system level. Maybe +this configuration could depend on partner language, country or company, +as discussed at `this OCA issue `_ diff --git a/partner_firstname/readme/USAGE.rst b/partner_firstname/readme/USAGE.rst new file mode 100644 index 000000000..63f0c7ddc --- /dev/null +++ b/partner_firstname/readme/USAGE.rst @@ -0,0 +1,13 @@ +The field *name* becomes a stored function field concatenating the *last name* +and the *first name*. This avoids breaking compatibility with other modules. + +Users should fulfill manually the separate fields for *last name* and *first +name*, but in case you edit just the *name* field in some unexpected module, +there is an inverse function that tries to split that automatically. It assumes +that you write the *name* in format configured (*"Lastname Firstname"*, by default), +but it could lead to wrong splitting (because it's just blindly trying to +guess what you meant), so you better specify it manually. + +For the same reason, after installing, previous names for contacts will stay in +the *name* field, and the first time you edit any of them you will be asked to +supply the *last name* and *first name* (just once per contact). diff --git a/partner_firstname/static/description/index.html b/partner_firstname/static/description/index.html new file mode 100644 index 000000000..b22d105e2 --- /dev/null +++ b/partner_firstname/static/description/index.html @@ -0,0 +1,480 @@ + + + + + + +Partner first name and last name + + + +
+

Partner first name and last name

+ + +

Beta License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runbot

+

This module was written to extend the functionality of contacts to support +having separate last name and first name.

+

Table of contents

+ +
+

Configuration

+

You can configure some common name patterns for the inverse function +in Settings > General settings:

+
    +
  • Lastname Firstname: For example ‘Anderson Robert’
  • +
  • Lastname, Firstname: For example ‘Anderson, Robert’
  • +
  • Firstname Lastname: For example ‘Robert Anderson’
  • +
+

After applying the changes, you can recalculate all partners name clicking +“Recalculate names” button. Note: This process could take so much time depending +how many partners there are in database.

+

You can use _get_inverse_name method to get lastname and firstname from a simple string +and also _get_computed_name to get a name form the lastname and firstname. +These methods can be overridden to change the format specified above.

+
+
+

Usage

+

The field name becomes a stored function field concatenating the last name +and the first name. This avoids breaking compatibility with other modules.

+

Users should fulfill manually the separate fields for last name and first +name, but in case you edit just the name field in some unexpected module, +there is an inverse function that tries to split that automatically. It assumes +that you write the name in format configured (“Lastname Firstname”, by default), +but it could lead to wrong splitting (because it’s just blindly trying to +guess what you meant), so you better specify it manually.

+

For the same reason, after installing, previous names for contacts will stay in +the name field, and the first time you edit any of them you will be asked to +supply the last name and first name (just once per contact).

+
+
+

Known issues / Roadmap

+

Patterns for the inverse function are configurable only at system level. Maybe +this configuration could depend on partner language, country or company, +as discussed at this OCA issue

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
  • Grupo ESOC Ingeniería de Servicios
  • +
  • Tecnativa
  • +
  • LasLabs
  • +
  • ACSONE SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/partner-contact project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/partner_firstname/tests/__init__.py b/partner_firstname/tests/__init__.py index 215b9bd16..56bf8465d 100644 --- a/partner_firstname/tests/__init__.py +++ b/partner_firstname/tests/__init__.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# © 2014 Nemry Jonathan (Acsone SA/NV) (http://www.acsone.eu) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - from . import ( test_create, test_defaults, diff --git a/partner_firstname/tests/base.py b/partner_firstname/tests/base.py index 5d619e67c..12124bf88 100644 --- a/partner_firstname/tests/base.py +++ b/partner_firstname/tests/base.py @@ -1,5 +1,5 @@ -# -*- coding: utf-8 -*- -# © 2014 Nemry Jonathan (Acsone SA/NV) (http://www.acsone.eu) + +# Copyright 2014 Nemry Jonathan (Acsone SA/NV) (http://www.acsone.eu) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase @@ -23,14 +23,14 @@ class BaseCase(TransactionCase, MailInstalled): def create_original(self): self.original = self.env["res.partner"].create({ - "lastname": self.lastname, - "firstname": self.firstname}) + "firstname": self.firstname, + "lastname": self.lastname}) def expect(self, lastname, firstname, name=None): """Define what is expected in each field when ending.""" self.lastname = lastname self.firstname = firstname - self.name = name or "%s %s" % (lastname, firstname) + self.name = name or "%s %s" % (firstname, lastname) def tearDown(self): if self.check_fields: @@ -47,7 +47,7 @@ class BaseCase(TransactionCase, MailInstalled): def test_copy(self): """Copy the partner and compare the result.""" - self.expect(self.lastname, "%s (copy)" % self.firstname) + self.expect("%s (copy)" % self.lastname, self.firstname) self.changed = (self.original.with_context(copy=True, lang="en_US") .copy()) diff --git a/partner_firstname/tests/test_create.py b/partner_firstname/tests/test_create.py index 99802dbe1..2db57ce63 100644 --- a/partner_firstname/tests/test_create.py +++ b/partner_firstname/tests/test_create.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2015 Grupo ESOC Ingeniería de Servicios, S.L. - Jairo Llopis. +# Copyright 2015 Grupo ESOC Ingeniería de Servicios, S.L. - Jairo Llopis. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """Test default values for models.""" @@ -19,8 +18,8 @@ class PersonCase(TransactionCase): "firstname": "Núñez", "lastname": "Fernán", } - self.good_values["name"] = "%s %s" % (self.good_values["lastname"], - self.good_values["firstname"]) + self.good_values["name"] = "%s %s" % (self.good_values["firstname"], + self.good_values["lastname"]) if "default_is_company" in self.context: self.good_values["is_company"] = self.context["default_is_company"] self.values = self.good_values.copy() diff --git a/partner_firstname/tests/test_defaults.py b/partner_firstname/tests/test_defaults.py index 6eac96a7e..e4762b18a 100644 --- a/partner_firstname/tests/test_defaults.py +++ b/partner_firstname/tests/test_defaults.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2015 Grupo ESOC Ingeniería de Servicios, S.L. - Jairo Llopis. +# Copyright 2015 Grupo ESOC Ingeniería de Servicios, S.L. - Jairo Llopis. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """Test default values for models.""" @@ -19,8 +18,8 @@ class PersonCase(TransactionCase): "firstname": "Núñez", "lastname": "Fernán", } - self.values["name"] = "%s %s" % (self.values["lastname"], - self.values["firstname"]) + self.values["name"] = "%s %s" % (self.values["firstname"], + self.values["lastname"]) if "default_is_company" in self.context: self.values["is_company"] = self.context["default_is_company"] diff --git a/partner_firstname/tests/test_delete.py b/partner_firstname/tests/test_delete.py index 40979d671..de829bf22 100644 --- a/partner_firstname/tests/test_delete.py +++ b/partner_firstname/tests/test_delete.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2015 Grupo ESOC +# Copyright 2015 Grupo ESOC # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase diff --git a/partner_firstname/tests/test_empty.py b/partner_firstname/tests/test_empty.py index 00e51f930..987cb6569 100644 --- a/partner_firstname/tests/test_empty.py +++ b/partner_firstname/tests/test_empty.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- -# © 2014-2015 Grupo ESOC -# © 2016 Yannick Vaucher (Camptocamp) +# Copyright 2014-2015 Grupo ESOC +# Copyright 2016 Yannick Vaucher (Camptocamp) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """Test situations where names are empty. diff --git a/partner_firstname/tests/test_name.py b/partner_firstname/tests/test_name.py index 0c699bbd5..6ef3cd95a 100644 --- a/partner_firstname/tests/test_name.py +++ b/partner_firstname/tests/test_name.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # Authors: Nemry Jonathan # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved @@ -47,7 +45,7 @@ class PartnerContactCase(BaseCase): def test_whitespace_cleanup(self): """Check that whitespace in name gets cleared.""" self.expect("newlästname", "newfïrstname") - self.original.name = " newlästname newfïrstname " + self.original.name = " newfïrstname newlästname " # Need this to refresh the ``name`` field self.original.invalidate_cache() @@ -72,7 +70,7 @@ class PartnerCompanyCase(BaseCase): class UserCase(PartnerContactCase): def create_original(self): - name = "%s %s" % (self.lastname, self.firstname) + name = "%s %s" % (self.firstname, self.lastname) # Cannot create users if ``mail`` is installed if self.mail_installed(): diff --git a/partner_firstname/tests/test_onchange.py b/partner_firstname/tests/test_onchange.py index 8201eaf70..10a4bd54f 100644 --- a/partner_firstname/tests/test_onchange.py +++ b/partner_firstname/tests/test_onchange.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2015 Grupo ESOC +# Copyright 2015 Grupo ESOC # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """These tests try to mimic the behavior of the UI form. @@ -102,4 +101,4 @@ class PartnerContactCase(OnChangeCase): self.assertEqual(partner.lastname, lastname) self.assertEqual(partner.firstname, firstname) - self.assertEqual(partner.name, " ".join((lastname, firstname))) + self.assertEqual(partner.name, " ".join((firstname, lastname))) diff --git a/partner_firstname/tests/test_order.py b/partner_firstname/tests/test_order.py index 3a72b7fac..7be76b8bb 100644 --- a/partner_firstname/tests/test_order.py +++ b/partner_firstname/tests/test_order.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2015 Antiun Ingenieria S.L. - Antonio Espinosa +# Copyright 2015 Antiun Ingenieria S.L. - Antonio Espinosa # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase diff --git a/partner_firstname/tests/test_user_onchange.py b/partner_firstname/tests/test_user_onchange.py index fbf215ba8..ae9a9c259 100644 --- a/partner_firstname/tests/test_user_onchange.py +++ b/partner_firstname/tests/test_user_onchange.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2016 Yannick Vaucher (Camptocamp SA) +# Copyright 2016 Yannick Vaucher (Camptocamp SA) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.tests.common import TransactionCase @@ -46,7 +45,7 @@ class UserOnchangeCase(TransactionCase): self.assertEqual(self.user.lastname, lastname) self.assertEqual(self.user.firstname, firstname) - self.assertEqual(self.user.name, " ".join((lastname, firstname))) + self.assertEqual(self.user.name, " ".join((firstname, lastname))) def setUp(self): super(UserOnchangeCase, self).setUp() diff --git a/partner_firstname/views/base_config_view.xml b/partner_firstname/views/base_config_view.xml index b29910196..5b968567d 100644 --- a/partner_firstname/views/base_config_view.xml +++ b/partner_firstname/views/base_config_view.xml @@ -1,5 +1,5 @@ - @@ -10,7 +10,7 @@ ref="base_setup.res_config_settings_view_form"/> -

Partner names order

+

Partner Names Order