Issue 9776

Add promotion based on total amount of sale
Nosy list
ced, pokoli, reviewbot, roundup-bot
Assigned to

Created on 2020-10-30.17:27:34 by ced, last changed 1 month ago by roundup-bot.


New changeset 9b2ecda2e789 by Cédric Krier in branch 'default':
Apply promotion per total amount of sale
New changeset 31b3659c68ef by Cédric Krier in branch 'default':
Exclude by default shipment cost from promotion amount
New changeset 61b33c245877 by Cédric Krier in branch 'default':
Apply promotion per total amount of sale
New changeset d1ec80663205 by Cédric Krier in branch 'default':
Add TaxableMixin to sale line
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-11-06.20:41:09

I think we could make the amount configurable with a set of checkboxes like "exclude taxes", "exclude shipment cost" etc.
For that I think we can extend get_amount to pass a filter function that will be used to exclude some line in the sum computation.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-11-06.19:20:48

The amount can be customized so I do not see it as problem. Indeed the problem comes from the imprecision of the natural language. Also the amount set could take care of the shipment cost.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-11-06.18:42:30

I'm not sure if this is working correctly in some corner case of free shipping. Let me put an example:

  1. Create a promotion of free shipment over 100€ amount
  2. Create a carrier with fixed shipment cost of 10€.
  3. Sale 3 units of a product with unit price of 29€ unit_price and an tax of 10%. (Total amount = 95.70€)

After quoting the sale I get the promotion applied because the sale_shipment_cost of 10€ is included on the total amount of the sale (resulting in an amount over 95.70€). This may be desirable for some promotions but I do not think this is right for free shipment.

So for me, we are missing some way to skip the current line in the amount.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-10-30.17:27:33

This can be useful for example to setup a free shipping over a specific amount.
The total amount used is the one before any promotion is applied.

Date User Action Args
2020-12-22 00:25:37roundup-botsetmessages: + msg63557
2020-12-22 00:25:32roundup-botsetmessages: + msg63556
2020-12-22 00:25:25roundup-botsetmessages: + msg63555
2020-12-22 00:25:21roundup-botsetmessages: + msg63554
nosy: + roundup-bot
status: testing -> resolved
2020-12-06 00:32:13reviewbotsetmessages: + msg62462
2020-12-05 23:55:04reviewbotsetmessages: + msg62461
2020-12-05 23:54:59reviewbotsetmessages: + msg62460
2020-12-05 23:54:58reviewbotsetreviews: 314721002,322501006 -> 314721002, 322501006, 326791003
2020-11-27 22:52:25reviewbotsetmessages: + msg62270
2020-11-27 22:52:22reviewbotsetmessages: + msg62269

Showing 10 items. Show all history (warning: this could be VERY long)