Tryton - Issues



Title Allow to finish a subscription line before it's next consumption
Priority feature Status resolved
Superseder Nosy List ced, pokoli, reviewbot, roundup-bot
Type behavior Components sale_subscription
Assigned To ced Keywords review
Reviews 72401002
View: 72401002

Created on 2019-02-06.18:17:14 by pokoli, last changed by roundup-bot.

New changeset 4119c0ccff7e by Cédric Krier in branch 'default':
Allow to finish line before next consumption
New changeset 3ddf6d1eab0d by Cédric Krier in branch 'default':
Allow to finish line before next consumption
msg52462 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-10-13.20:21:46
Can we include this on 5.4?
review72401002 updated at
review72401002 updated at
review72401002 updated at
msg49757 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-05-17.21:19:06
I re read the issue and I do not think we should take in account if the date is on the future or not. Normally consumptions are created by cron an they will be up-to date, so for me the end date should be before the next consumption end's date. 

I've updated the review acordingly.
msg46832 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-07.10:53:17
Indeed the constraint could be relaxed with:

- the end date should be after the last consumption created if it is in the future
- or the end date should be after the next consumption.
msg46829 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-02-07.10:40:38
Still agree but how I can prevent the next consumption before it starts?
msg46828 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-07.10:26:24
Well if you have a next_consumption_date, it means that the service has already started to be consumed so you can not stop before.
msg46824 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-02-07.09:43:14
Yes, I agree with you but I'm saying something different. 

I want to cancel in the middle of a period the next period. So If period goes from 01/02/2019 to 28/02/2019, I wan't to set line end_date to 28/02/2019 so the consumption for 01/03/2019 is not created. 

Currently this is not possible as the line end_date must be >= that the next_consuption_date (which following the example is 01/03/2019), so I have to enter 01/03/2019 as minimun end_date and this generated the consumption for the next period which is not what the user expects.
msg46823 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-07.09:31:57
Yes but you can cancel it before the 01/02/2019 otherwise the next one (period: from 01/02/2019 to 28/02/2019) is already started. You can not cancel a rental in the middle of a period.
msg46821 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-02-07.08:48:24
Sorry but don't understand what do you mean. For me it's quite obvious that if a consumption lasts for several days you can prevent the next consumption before finishing the current one (or before the next one is generated). 

On our use case we are using monthly consumptions, so if the last consumption is for 01/02/2019 we expect to be able to cancel the next consumption until 28/02/2019
msg46799 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-06.19:28:19
I think it goes against the design of the module. A consumption is starting to be consume directly after the previous one (it is continuous).
review72401002 updated at
msg46797 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-02-06.18:17:14
We've got the following case:

1. One customer has a running subscription service (which has been already invoiced)
2. Before the next consumption the customer wants to upgrade to a different service.

In order to do so we want to set the end date for the line to the day before the next subscription and we create a new line with the new service. But when trying to do so the server complains that the end date must be higher than the next_consumption date. 

I think we should allow to end the line before next consumption and do not create the next consumption as the service have never consumed.
Date User Action Args
2019-10-14 00:18:02roundup-botsetmessages: + msg52481
2019-10-14 00:17:59roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg52480
2019-10-13 20:21:46pokolisetmessages: + msg52462
2019-10-04 19:46:44reviewbotsetmessages: + msg52289
2019-10-03 19:15:37reviewbotsetmessages: + msg52276
2019-10-03 18:45:12cedsetassignedto: pokoli -> ced
2019-05-17 21:35:47reviewbotsetmessages: + msg49760
2019-05-17 21:19:06pokolisetmessages: + msg49757
2019-02-07 10:53:17cedsetmessages: + msg46832
2019-02-07 10:40:38pokolisetmessages: + msg46829

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