Vauxoo / odoo

Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
https://www.odoo.com
Other
9 stars 9 forks source link

[FIX] website: Proper management of validation errors in frontend #374

Closed WR-96 closed 3 years ago

WR-96 commented 3 years ago

Description of the issue/feature this PR addresses:

[FIX] website: Proper management of validation errors in frontend

Current behavior before PR:

We can suppose the case where we need to put any kind of validation, constraint or error, at the moment of publishing an element on the website the error message shown doesn't include the original text of the corresponding validation but it shows the text 'undefined' instead of a human-readable text. photo_2020-10-14_14-36-51

Desired behavior after PR is merged:

After this change instead of showing the 'undefined' text the 'raise' message returned by the server is correctly displayed, with an appropriate title that allows the user to know what kind of validation error is actually failing, making it easier to take a decision to the user.

Screenshot_2020-10-14_22-54

-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Odoo PR: https://github.com/odoo/odoo/pull/60041

moylop260 commented 3 years ago

crea la pr a odoo we

moylop260 commented 3 years ago

ellos la ven en nuestra noche tageas a nim-odoo

WR-96 commented 3 years ago

Este es el PR a Odoo: https://github.com/odoo/odoo/pull/60041

hbto commented 3 years ago

Rebasing because the last force-push included a huge diff from other commits.

Screen Shot 2020-10-24 at 2 20 09

Screen Shot 2020-10-24 at 2 18 23

cc/ @WR-96 @mart-e

Regards.

mart-e commented 3 years ago

Oups, sorry about it, I did not realised the branch was shared between two different PRs. I made a rebase as the runbot was red, due to a pylint issue (which is solved now)

luisg123v commented 3 years ago

@hbto another reason for keeping only one PR, the one for odoo/odoo :smile:

luisg123v commented 3 years ago

BTW @WR-96, remember to move CLA signature onto a separate commit, as your PR is not mergeable until so.

moylop260 commented 3 years ago

PR closed since that the real one is for odoo: