nie a47143ed6e [FIX] coupon: public user cannot use promo code with edited rule
Steps:
- Install eCommerce
- Go to Website > Products > Promotion Programs
- Create a promotion program with a filter Based on Customers and a promotion code
- Save
- Edit the new program and clear the filter Based on Customers
- Save again
- Log out and go to the shop
- Add an article to your cart and click "View Cart"
- Click "I have a promo code"
- Apply the promo code you created earlier

Bug:
The promo code is not accepted.

Explanation:
When the filter Based on Customers is cleared, `[]` is written on the program rule. This makes the app search for a partner with id = 4 (Public User). Since this user is not active, the search returns no results and, therefore, forbids the user from using the promo code.
This works flawlessly when you create a promotion program with no filters as they are initialized with `NULL` and a `NULL` filter always returns `True`.

opw:2419796

closes odoo/odoo#63822

X-original-commit: d31a86cead03623c375f4162324a6d1872cad6a3
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-12-28 11:09:22 +00:00
2020-04-20 11:41:39 +00:00
…
…
…
…
2019-11-08 11:24:04 +00:00
2020-09-28 14:07:25 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%