diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-05-02 13:04:51 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-05-02 13:23:35 +0000 |
| commit | c9d98ec511530c317240563f38d75ea7a7fe3a9c (patch) | |
| tree | c3812df72abbe06658918585a678c35d1594da73 /addons/payment_authorize/controllers | |
| parent | 4a380414a714a88871e21fbb0b854675a9939282 (diff) | |
[FIX] payment_authorize: missing fields
- Activate Invoice Online Payment
- Set Authorize to pay through Odoo (S2S)
- Create a new customer (do not give portal access)
- Create invoice -> send to them
- Open invoice in incognito mode
- Try to pay invoice online with Authorize
An error is raised:
The transaction cannot be processed because some contact details are
missing or invalid: City, Country. Please sign in to complete your
profile.If you don't have any account, please ask your salesperson to
update your profile.
The error is quite confusing, and the user is missing the main point: he
needs to sign in.
There is no reason to display the fact that contact details are missing
for a public user, so this part is now shown only if the user is logged
in.
opw-1981003
closes odoo/odoo#33116
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/payment_authorize/controllers')
| -rw-r--r-- | addons/payment_authorize/controllers/main.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/payment_authorize/controllers/main.py b/addons/payment_authorize/controllers/main.py index 70d641564a6..cf6877218db 100644 --- a/addons/payment_authorize/controllers/main.py +++ b/addons/payment_authorize/controllers/main.py @@ -55,14 +55,14 @@ class AuthorizeController(http.Controller): except ValidationError as e: message = e.args[0] if isinstance(message, dict) and 'missing_fields' in message: - msg = _("The transaction cannot be processed because some contact details are missing or invalid: ") - message = msg + ', '.join(message['missing_fields']) + '. ' if request.env.user._is_public(): - message += _("Please sign in to complete your profile.") + message = _("Please sign in to complete the payment.") # update message if portal mode = b2b if request.env['ir.config_parameter'].sudo().get_param('auth_signup.allow_uninvited', 'False').lower() == 'false': - message += _("If you don't have any account, please ask your salesperson to update your profile. ") + message += _(" If you don't have any account, ask your salesperson to grant you a portal access. ") else: + msg = _("The transaction cannot be processed because some contact details are missing or invalid: ") + message = msg + ', '.join(message['missing_fields']) + '. ' message += _("Please complete your profile. ") return { |
