diff options
| author | Romain Derie <rde@odoo.com> | 2018-01-02 12:01:21 +0100 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2018-01-12 12:37:48 +0100 |
| commit | 4c6b47450547acffcdd12b78891d88690f6c4f7b (patch) | |
| tree | a28a5f5f013e43a2989aa425069e12847ce9badb /tests/test_program_with_code_operations.py | |
| parent | 368f14bd0cf6e840eee5e80da14d633966d0c627 (diff) | |
[FIX] sale_coupon: min quantity set to 0 will crash backend and shop
Before this commit, if minimum product quantity was set to 0 on a coupon
program, it would then throw:
- On backend, when updating promotions
- On frontend (shop), user won't access his cart (error 500)
Now, we prevent quantity from being lower than 1
Step to reproduce:
- Create a coupon automatically applied, set quantity to 0, set reward to
'Free Product' and set free product to iPad Mini
- Go to /shop and add a iPad Mini to your cart, it will throw an error 500
instead of redirecting to your cart
- Go to backend, click on 'Update Promotions' on a quotation, it will show an
error popup
Diffstat (limited to 'tests/test_program_with_code_operations.py')
0 files changed, 0 insertions, 0 deletions
