odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FIX] pos_restaurant: validate number of guest put by user

Open fernandahf opened this issue 3 years ago • 3 comments

Description of the issue/feature this PR addresses:

The user could make the mistake to put a large number in the Guests number in the order of POS and this is not validated, this MR is adding a validation error in order to limit the number of Guests.

Current behavior before PR:

Error in the confirmation page in POS related to the number of guests is so large to save in the field in DB.

psycopg2.errors.NumericValueOutOfRange: integer out of range

Desired behavior after PR is merged:

Validation error with a friendly message to the user at the time of put the number of guests large:

Screen Shot 2022-11-09 at 9 31 17

Fix https://github.com/odoo/odoo/issues/105389


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

fernandahf avatar Nov 08 '22 23:11 fernandahf

@hugho-ad

Could you review this, please?

fernandahf avatar Nov 08 '22 23:11 fernandahf

Pull request status dashboard

robodoo avatar Nov 08 '22 23:11 robodoo

Hello @trj-odoo @pimodoo

could you please review this?

hugho-ad avatar Nov 18 '22 16:11 hugho-ad

Also, please add a commit message description, see https://www.odoo.com/documentation/master/contributing/development/coding_guidelines.html?highlight=github%20guideline#commit-message-full-description

trj-odoo avatar Nov 21 '22 11:11 trj-odoo

@trj-odoo

The commit message description was updated.

cc @hugho-ad

fernandahf avatar Nov 21 '22 18:11 fernandahf

@robodoo r+

trj-odoo avatar Nov 22 '22 16:11 trj-odoo

@fernandahf @trj-odoo we apparently missed an update to this PR and tried to stage it in a state which might not have been approved. PR has been updated to 45b55cc9a9a29783836fe28b38aff3d4b3259ac3, please check and approve or re-approve.

robodoo avatar Nov 22 '22 17:11 robodoo

@trj-odoo

could please retry the merge?

hugho-ad avatar Nov 24 '22 16:11 hugho-ad

@robodoo r+

trj-odoo avatar Nov 25 '22 07:11 trj-odoo

@fernandahf @trj-odoo this pull request has forward-port PRs awaiting action (not merged or closed): odoo/odoo#106523

fw-bot avatar Nov 29 '22 05:11 fw-bot