diff --git a/partner_second_lastname/__manifest__.py b/partner_second_lastname/__manifest__.py index 6948dcba4..159c4247a 100644 --- a/partner_second_lastname/__manifest__.py +++ b/partner_second_lastname/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Partner second last name", "summary": "Have split first and second lastnames", - "version": "13.0.2.0.0", + "version": "14.0.1.0.0", "license": "AGPL-3", "website": "https://github.com/OCA/partner-contact", "author": "Tecnativa, " "Odoo Community Association (OCA)", diff --git a/partner_second_lastname/models/res_partner.py b/partner_second_lastname/models/res_partner.py index ed0427fc9..b1b09deb5 100644 --- a/partner_second_lastname/models/res_partner.py +++ b/partner_second_lastname/models/res_partner.py @@ -13,7 +13,9 @@ class ResPartner(models.Model): _inherit = "res.partner" - lastname2 = fields.Char("Second last name",) + lastname2 = fields.Char( + "Second last name", + ) @api.model def _get_computed_name(self, lastname, firstname, lastname2=None): @@ -47,7 +49,9 @@ class ResPartner(models.Model): """Write :attr:`~.name` according to splitted data.""" for partner in self: partner.name = self._get_computed_name( - partner.lastname, partner.firstname, partner.lastname2, + partner.lastname, + partner.firstname, + partner.lastname2, ) def _inverse_name(self): diff --git a/partner_second_lastname/views/res_partner.xml b/partner_second_lastname/views/res_partner.xml index c1a6b8164..5af3f4afc 100644 --- a/partner_second_lastname/views/res_partner.xml +++ b/partner_second_lastname/views/res_partner.xml @@ -11,14 +11,16 @@ /> - {'required': [('lastname', '=', False), ('lastname2', '=', False), ('is_company', '=', False), ('type', '=', 'contact')]} + + {'required': [('lastname', '=', False), ('lastname2', '=', False), + ('is_company', '=', False), ('type', '=', 'contact')]} + - {'required': [('firstname', '=', False), ('lastname2', '=', False), ('is_company', '=', False), ('type', '=', 'contact')]} + + {'required': [('firstname', '=', False), ('lastname2', '=', False), + ('is_company', '=', False), ('type', '=', 'contact')]} + - {'required': [('lastname', '=', False), ('lastname2', '=', False), ('is_company', '=', False), ('type', '=', 'contact')]} + + {'required': [('lastname', '=', False), ('lastname2', '=', False), + ('is_company', '=', False), ('type', '=', 'contact')]} + - {'required': [('firstname', '=', False), ('lastname2', '=', False), ('is_company', '=', False), ('type', '=', 'contact')]} + + {'required': [('firstname', '=', False), ('lastname2', '=', False), + ('is_company', '=', False), ('type', '=', 'contact')]} + - {'required': [('lastname', '=', False), ('lastname2', '=', False), ('is_company', '=', False), ('type', '=', 'contact')]} + + {'required': [('lastname', '=', False), ('lastname2', '=', False), + ('is_company', '=', False), ('type', '=', 'contact')]} + - {'required': [('firstname', '=', False), ('lastname2', '=', False), ('is_company', '=', False), ('type', '=', 'contact')]} + + {'required': [('firstname', '=', False), ('lastname2', '=', False), + ('is_company', '=', False), ('type', '=', 'contact')]} + - {'required': [('lastname', '=', False), ('lastname2', '=', False)]} + + {'required': [('lastname', '=', False), ('lastname2', '=', False)]} + - {'required': [('firstname', '=', False), ('lastname2', '=', False)]} + + {'required': [('firstname', '=', False), ('lastname2', '=', False)]} +