From ed8274a3e319890b2b6620b2939f3838e07faf10 Mon Sep 17 00:00:00 2001 From: Luis Torres Date: Mon, 12 Oct 2020 15:00:12 +0000 Subject: [PATCH] [MIG] partner_firstname: Migration to 14.0 --- partner_firstname/__manifest__.py | 2 +- partner_firstname/exceptions.py | 4 ++-- partner_firstname/views/res_partner.xml | 18 ++++++++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) 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)] - } + } +