#5639 (Scrutinize UserPlan.create_user_plan)
by Sharif Mehedi · in Developers
Kokkuvõte
A user can have only one UserPlan per model (for, calling create_user_plan a second time takes out the existing plan from the database for the given user and updates it). I think this is counter intuitive. Could we have an option such as UserPlan.single_plan_only = True
And when the option is set to False, create_user_plan would not look into the database and will create a plan directly.
Children
Kommentaarid
- 2 aastat, 4 kuud ago by Luc Saffre about #5639 (Scrutinize UserPlan.create_user_plan) : If the shopping cart was your only example, then yes, let's refuse it. But it was an interesting question, we should document it. That's what a UserPlan is about. The mixin encapsulates that notion of existing only once per user. The POS agent can always create an order whey they want something to r...
- 2 aastat, 4 kuud ago by Sharif Mehedi about #5639 (Scrutinize UserPlan.create_user_plan) : Maybe we should refuse this ticket.
- 2 aastat, 4 kuud ago by Sharif Mehedi about #5639 (Scrutinize UserPlan.create_user_plan) : For example, a shopping.Cart inherits from UserPlan. My initial thought was that a POS agent, would create a Cart for each sale. but I am NOT yet sure, the POS agent may NOT have further use for a Cart after converting it into an order.
- 2 aastat, 4 kuud ago by Luc Saffre about #5639 (Scrutinize UserPlan.create_user_plan) : Please give an exampe of a situation where you want a UserPlan that gets *not* reused.
- 2 aastat, 4 kuud ago by Sharif Mehedi about #5639 (Scrutinize UserPlan.create_user_plan) : See description.
- 2 aastat, 4 kuud ago by Sharif Mehedi about #5639 (Scrutinize UserPlan.create_user_plan) : Created new Ticket #5639 (Scrutinize UserPlan.create_user_plan).