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 inherit message_new method of sale.order Sale.order inherit from mail.thread (my.object -> sale.order -> mail.thread), so I was expected to simply add a method in my object which call a super(), but when I try to debug it, I never pass in my method.
There is a sample of my code:
class sale_order(osv.osv): _inherit = 'sale.order' def message_new(self, cr, uid, msg_dict, custom_values=None, context=None): res = super(sale_order, self).message_new(cr, uid, msg_dict, custom_values, context) return res
I put it in a new module.
In mail_thread.py a comment says:
Inheriting classes are not required to implement any method, as the default implementation will work for any model. However it is common to override at least the
super) to add model-specific behavior at creation and update of a thread when processing incoming emails.
What I did wrong? How I can modify the thread behavior, for example to modify the message "Document created"?
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: 3/3/14, 12:59 PM|
|Seen: 1966 times|
|Last updated: 3/16/15, 8:10 AM|