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.

0

Automatically having customers follow projects created from their respective SO

By
Pat Miller
on 6/22/16, 4:27 PM 160 views

We have Odoo setup now to create a project from SO's, with tasks in that project generated from appropriate services the customer is purchasing. This is a great way for them to be able to track the progress of their order via the portal, we've found.


However, it seems we have to manually add the customer as a follower to the project once it's created. The closest to a resolution I've found was a feature request for v7: https://bugs.launchpad.net/openobject-addons/+bug/1099181


I still can't find a way to do it in v9c. Suggestions?    

0

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 6/23/16, 3:48 AM

Hello,

I think it depends on they way you're linking the SO to the Project as:

* if you're modified the Project to fetch the SO ID, or the Customer ID [m2o to customer or SO]. Then you can add the customer to the follower from the automated actions under Technical -> automation -> automated Actions. 

* But if there is no relation between the project and SO/SO customer, I think you need to modify the method that creating the Project from the SO, to subscribe the customer as:

project.message_subscribe_users(user_ids=[so.partner_id])


Update:

If you'll override the _get_project function then you can add after this line:

project.message_subscribe(partner_ids=[project.partner_id.id])


So this will add the customer to the Project ..


Hope this could help a little bit ...

Definitely helpful, thank you. I'm only stuck in finding how exactly Odoo is creating the project from the SO. I did this via the setting Project->Configuration->Settings->Sale Service->Generate tasks from sales orders

It didn't create any automated actions that I can see, but it is able to create a project named after the SO, and all tasks contain the SO in them as well as the item/product name.

Pat Miller
on 6/23/16, 12:39 PM

I did try throwing "project.message_subscribe_users(user_ids=[so.partner_id])" into sale_service.py, under "if not project:" (line 67) and it's coming back with "NameError: global name 'so' is not defined" when I confirm the SO/generate the project.

Pat Miller
on 6/23/16, 1:41 PM

Mate !, I just thought you made some customization on generating the Task ... So I think you need to modify the method that generating this tasks .. I'll post here again if I found spare time ...

Ahmed M.Elmubarak
on 6/26/16, 3:34 AM

I've updated my answer ...

Ahmed M.Elmubarak
on 6/26/16, 4:56 AM

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: 6/22/16, 4:27 PM
Seen: 160 times
Last updated: 6/23/16, 3:48 AM