diff --git a/partner_firstname/__manifest__.py b/partner_firstname/__manifest__.py index 83b43ba38..656704dd8 100644 --- a/partner_firstname/__manifest__.py +++ b/partner_firstname/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Partner first name and last name", "summary": "Split first name and last name for non company partners", - "version": "13.0.1.0.1", + "version": "14.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 00c0ce495..130f683b4 100644 --- a/partner_firstname/exceptions.py +++ b/partner_firstname/exceptions.py @@ -8,5 +8,5 @@ class EmptyNamesError(exceptions.ValidationError): value = value or _("No name is set.") self.record = record self._value = value - self.name = _("Error(s) with partner %d's name.") % record.id - self.args = (self.name, value) + self._name = _("Error(s) with partner %d's name.") % record.id + self.args = (self._name, value) diff --git a/partner_firstname/views/res_partner.xml b/partner_firstname/views/res_partner.xml index f49b3302a..474cd51dd 100644 --- a/partner_firstname/views/res_partner.xml +++ b/partner_firstname/views/res_partner.xml @@ -7,10 +7,12 @@ - { + + { 'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)] - } + } + @@ -38,10 +40,12 @@ - { + + { 'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)] - } + } +
@@ -66,10 +70,12 @@ expr="//field[@name='child_ids']/form//field[@name='name']" position="attributes" > - { + + { 'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)] - } + } +