Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

<BUG> "Services" break workflow - Sales Order Status will not set to DONE

By
Damian Phang
on 2/7/14, 2:43 AM 2,186 views

I noticed that if you have a service, for example, a delivery service, in a sale order line it will break the whole workflow. Status of the sale order will be left at sale order instead of being set to DONE despite having already received the payment and delivered the product.

Try this: #1 - Set a product as service #2 - Set to make to stock/make to order (doesn't really matter, it will break the workflow anyway) #3 - create a new order #4 - Add a simple product, add the delivery service #5 - confirm the order, receive the payment, deliver the product. #6 - Go to Sales Order and you will see status still being set to "Sales Order" and not "Done"

Repeat the above without the delivery service and you will see that it is now set to complete.

How do we fix this?

0
ACLENYON Sprl
On 5/16/14, 8:52 AM

Confirmed, same behaviour with last night's build. Any progress on your side?

Found the issue: It lies on line 272 in sale_stock.py:

if (not line.procurement_id) or (line.procurement_id.state=='done'):

line.procurement_id.state goes to 'done' only for stockable product when the delivery is completed. This is not the case for 'service' or 'product'. A fix is to change the line to:

if (line.product_id.type=='consu' or line.product_id.type=='service' or (not line.procurement_id) or (line.procurement_id.state=='done')):

Problem is fixed

0
Santi
On 7/11/14, 5:55 AM

I had the same problem. Sale Orders state didn't change to "Done" after delivering the shipment and paying the invoice. 

After installing mrp_jit (Just In Time Scheduling) module, my problem was solved....it changes the state of the Services to "Done" whichj allows the Sale Order state to change to "Done" as well. I'm not 100% sure what else this module does though...

0
Alexandros Katsonis
On 9/22/14, 7:31 AM

I just want to point out that the bug still exists in OpenErp Version 7.0-20140804-231303. When ever a service is sold the status of the Sales Order remains "Sales Order" and never goes to Done.

I installed the mrp_jit (Just In Time Scheduling) module but nothing changed.

The next step is to edit the file sale_stock.py but I'm concerned about updates. Won't updates rewrite the sale_stock.py file? Anyone found another solution?

Thank you in avance.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/7/14, 2:43 AM
Seen: 2186 times
Last updated: 7/19/16, 7:50 AM