Tryton - Issues

 

Issue4618

Title Cancel draft moves and draft invoice when canceling sale order
Priority feature Status chatting
Superseder Nosy List ced, pokoli, resteve, reviewbot, xcodinas
Type behavior Components purchase, sale
Assigned To Keywords easy, review
Reviews

Created on 2015-03-05.23:21:12 by ced, last changed by xcodinas.

Messages
msg32039 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-02-17.15:30:05
On 2017-02-17 14:04, Xavier Codinas wrote:
> Indeed, the user should be able to post the invoices or to send the moves
> before pressing the cancel button so if there is something still pending to 
> do it must be done before canceling the processing sale.

First, the user could not have the right to do those operations on the
invoices or shipments.
Second, if the user still has to look at those document, he can also
cancel them.

> > And there are such related action done, does it still makes sense to set the
> > state of the sale as canceled?
> The state of the sale will never be canceled, it will be the same as if you 
> followed the manual cancel procedure.

Then this is misleading. If I press a cancel button, I expect the
document to be cancelled.

So I'm still not convinced that it must be implemented.
msg32035 (view) Author: [hidden] (xcodinas) (Tryton committer) Date: 2017-02-17.14:04:43
> I do not think this is a doable feature because there are so many options to 
> choose when cancelling a validated order.
> For example, what does it mean if there are already shipment sent? 
> Do they need to be returned or not? 
> The same for paid invoices. 
I think nothing should not be returned automatically. 
In case the user wants to create a shipment return or credit invoice it can
be done manually, allowing to create a new sale to manage both documents if
required. 

Indeed, the user should be able to post the invoices or to send the moves
before pressing the cancel button so if there is something still pending to 
do it must be done before canceling the processing sale.

> And there are such related action done, does it still makes sense to set the
> state of the sale as canceled?
The state of the sale will never be canceled, it will be the same as if you 
followed the manual cancel procedure.
msg31969 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-02-16.11:38:14
I do not think this is a doable feature because there are so many options to choose when cancelling a validated order.
For example, what does it mean if there are already shipment sent? Do they need to be returned or not? The same for paid invoices. And there are such related action done, does it still makes sense to set the state of the sale as cancelled?

In conclusion, for me this feature should not be implemented because what we have now is far more flexible and force the user to ask the right questions.
review27111002 updated at https://codereview.tryton.org/27111002/#ps40001
review28001002 updated at https://codereview.tryton.org/28001002/#ps20001
review27111002 updated at https://codereview.tryton.org/27111002/#ps20001
New review28001002 at https://codereview.tryton.org/28001002/#ps1
New review27111002 at https://codereview.tryton.org/27111002/#ps1
msg31915 (view) Author: [hidden] (xcodinas) (Tryton committer) Date: 2017-02-14.13:40:37
I add review27111002 for sale and review28001002 for purchase which cancels the moves, 
the returns (if some) and the invoices if they are in draft state.

Moves and invoices are ignored from the exception when canceled because 
for me, if they are on draft state and you cancel it, the exception shouldn't 
be raised as they are canceled on propose, in order to warn this a confirm 
dialog is added, the purchase/sale is set as done.
msg20484 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-03-05.23:23:28
idem for purchase
msg20481 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-03-05.23:21:11
Extracted from TODO
History
Date User Action Args
2017-04-05 10:28:15xcodinassetstatus: testing -> chatting
reviews: 27111002, 28001002 ->
assignedto: xcodinas ->
2017-02-17 15:30:05cedsetmessages: + msg32039
2017-02-17 14:04:43xcodinassetmessages: + msg32035
2017-02-16 11:38:14cedsetmessages: + msg31969
2017-02-16 11:36:40reviewbotsetmessages: + msg31968
2017-02-16 11:36:34reviewbotsetmessages: + msg31967
2017-02-16 10:58:00reviewbotsetmessages: + msg31965
2017-02-14 14:04:14reviewbotsetmessages: + msg31917
2017-02-14 14:04:14reviewbotsetreviews: 27111002 -> 27111002, 28001002
2017-02-14 14:04:09reviewbotsetnosy: + reviewbot
messages: + msg31916

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