summaryrefslogtreecommitdiff
path: root/odoo
diff options
context:
space:
mode:
authorKamen Zhekov <kzh@odoo.com>2021-04-20 13:14:04 +0000
committerKamen Zhekov <kzh@odoo.com>2021-04-27 12:31:13 +0000
commit073a4a3d1dbc8ac973c963c6b53d23ba1635bfe4 (patch)
tree9b5d76006303657949a6ca8d47ccbfbc6394e77e /odoo
parent44b59d10d0ab6440b0a908f518c157a3d670627b (diff)
[FIX] base: Fix wrong wording for error when archiving a contact with a user still linked to it
Description of the issue/feature this PR addresses and current behavior before PR: There is a discrepancy in the wording of the error message provided. The error reads that an 'internal user' is linked but really its a 'portal user.'. Desired behavior after PR is merged: The wording of the error is clearer, and it now says 'portal user' instead of 'internal user'. OPW: 2498139 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr closes odoo/odoo#69925 X-original-commit: cdd94cddc2ba3478bb41227896609aded2bd8548 Signed-off-by: Simon Goffin (sig) <sig@openerp.com> Signed-off-by: Kamen Zhekov <kzhekov@users.noreply.github.com>
Diffstat (limited to 'odoo')
-rw-r--r--odoo/addons/base/i18n/base.pot2
-rw-r--r--odoo/addons/base/models/res_partner.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/odoo/addons/base/i18n/base.pot b/odoo/addons/base/i18n/base.pot
index adaf921547d..d809b28b599 100644
--- a/odoo/addons/base/i18n/base.pot
+++ b/odoo/addons/base/i18n/base.pot
@@ -25968,7 +25968,7 @@ msgstr ""
#. module: base
#: code:addons/base/models/res_partner.py:0
#, python-format
-msgid "You cannot archive a contact linked to an internal user."
+msgid "You cannot archive a contact linked to a portal or internal user."
msgstr ""
#. module: base
diff --git a/odoo/addons/base/models/res_partner.py b/odoo/addons/base/models/res_partner.py
index 1d148785a70..6ab7d6d4302 100644
--- a/odoo/addons/base/models/res_partner.py
+++ b/odoo/addons/base/models/res_partner.py
@@ -517,7 +517,7 @@ class Partner(models.Model):
self.invalidate_cache(['user_ids'], self._ids)
for partner in self:
if partner.active and partner.user_ids:
- raise ValidationError(_('You cannot archive a contact linked to an internal user.'))
+ raise ValidationError(_('You cannot archive a contact linked to a portal or internal user.'))
# res.partner must only allow to set the company_id of a partner if it
# is the same as the company of all users that inherit from this partner
# (this is to allow the code from res_users to write to the partner!) or