This question has been flagged
2 Replies
3886 Views

Hello, I wish to check the amount of time an opportunities in CRM module has been in each stage before closing.

For example:

Start date: 25/07/2019 12:30:00

End date:  26/07/2019 09:42:00

Then the opportunity took 21 hrs & 42 minutes to close, but I wish to get the time spent now in each stage for those 21 hrs & 42 minutes.

Is it possible from UI, if not, any ideas on how to get it?

Sorry for bad english.

Thanks beforehand.

Avatar
Discard

write a compute field to find the difference.

Best Answer

The start/end time for each stage isn't stored, so it wouldn't be possible to get that information without a bit of work. I could think of two ways to do this: 

You could create datetime fields to hold to start date of each stage. Then, in an automated action or through computed fields, set the start date for each stage when you reach it. 

If you need to get this information for old opportunities, you could try pulling the times from Mail Tracking Values. Each time the stage is changed, the old and new value are tracked in mail.tracking.value. You could search through all of the tracking value records, and find the ones corresponding to each opportunity, and then use the create date to find the time spent in each stage. This would probably be more work than the first method, but it would give you data for all opportunites, where as the first would just be new ones. 

Avatar
Discard
Author

Thanks for your comment, I'm trying to learn a bit about how odoo's programming is so I could check this, I appreciatte your good intentions.

Rodrigo