Skip to Content
Menu
This question has been flagged
10 Replies
5592 Views

Hy,

I'm wondering if it could be a great function to allow user to cancel (not delete) a sale order line in an order once it has been validated. I explain a little bit. Once a sale.order has been confirmed, it's almost impossible to get back. From times to times, in some business, the orders are related to work that can last a long time and sometimes, some order lines won't be charged to the customer because the "project/affair" has changed.

Thus, I propose some improvements :

  • Allow the sale.order.line to be canceled
  • Change the total amount computation so that canceled order lines won't be used for computation
  • Consequently change the invoiced_ratio of the sale.order
Avatar
Discard
Best Answer

This is already possible.

1) Create a menu for Sales Order Lines so you can access individual lines and cancel them after the order has been confirmed.

2) Add the state field to the tree view on the Sales Order form view so the status is shown:

image description

3) The TOTAL on the Sales Order won't be updated, but the Invoice WILL show the correct amount (you can't cancel a Sales Order line if it has been invoiced unless you first cancel that same line on the Invoice).

4) You probably want to update the Sales Order report to show state as well.

invoiced_rate already behaves as expected.

Avatar
Discard

Reposted from an answer to a comment (from Mind And Go): Hy Ray,

Thanks for this proposal. I'm not sure to understand your point when you say that the invoice rate will work as expected. Do you mean that the invoice_rate don't consider the canceled lines? I was expecting to override the amount total of the order but if the invoice rate is Ok so no problem.

I meant that invoice_rate works just fine in this scenario. Even with the 'old' total of $150, the sale order is 100% invoiced as soon as the $75 is paid. It needs no adjustments as it already supports your suggestion.

Author

Ray, thanks for you support. I tried what you proposed without success. I've done it this way : 1 - Create a sale order with many lines 2 - Invoice some of those lines 3 - Cancel those which haven't been invoiced Result : state is correctly shown in the order, the total_amount of the order hasn't changed, the invoice_ratio is not 100%, the order still in the state "manual" instead of order

Did you confirm the order?

Author

Sure, I can't make an invoice if the sale.order is not confirmed

This is what I did today on runbot. 1) Created the Menu 2) Created and confirmed a Sales Order (set to create invoice before delivery) for 3 products at 180€ 3) Cancelled one item (after removing that line from the invoice) reducing the total to 115€ 4) Paid the Invoice

The invoiced rate showed as 100, the invoice showed a total payment of 115€

Author

Ray, Ok I understand what you meant and I reproduce your workflow. Actually it is not what I'm expecting because of many points. I could need to cancel a line even if it hasn't been invoiced. I need to see the effective ratio before the invoice is paid, The sale margin must be update if I cancel a line in an order. If the canceled line is the latest of the order (and everything has been invoiced), I would like to change the state of the order. So in the end, I must override the method of sale object so that amount will be updated as well as margin and change the state of the object. Thx

Author Best Answer

Hy Ray,

Thanks for this proposal. I'm not sure to understand your point when you say that the invoice rate will work as expected. Do you mean that the invoice_rate don't consider the canceled lines? I was expecting to override the amount total of the order but if the invoice rate is Ok so no problem

Avatar
Discard
Best Answer

Did you manage to do it?


Avatar
Discard
Related Posts Replies Views Activity
1
Aug 24
224
0
May 23
1202
1
Jul 22
2156
1
Jul 24
1972
1
Nov 17
5308