Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I want to add a button in customer screen that should be displays all mails related to that customer,it may be either mail messages or support ticket mails or any another mails of him, all mails should be able to see in that customer screen only
could you please help me the coding part..
[('model','=','res.partner'),('res_id','=', current_customer_id)] is only gives the messages on that particular record of the partner. If "current_customer_id" is followers in any other document (i.e. sale.order) then above domain will not give you those messages.
So, please use the following domain to get all the messages.
You want all the messages which are geeting by the partner. I hope you will get as per your requirement.
As per my understanding of the message module in OpenERP. we will have mainly two fields in mail.message as "model" and "res_id" which will denotes the relation with other objects with in the Database.
So to list all the relating messages to a perticular customer
Create a button in the form view of Customer which will return an action that defaults to tree view of messages with a domain in action as [('model','=','res.partner'),('res_id','=', current_customer_id)]
I hope this will help you to acheive your requirement.
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/3/14, 1:40 AM|
|Seen: 1019 times|
|Last updated: 3/16/15, 8:10 AM|