Odoo Help


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.


OpenERP7 - Multiple inherits from code, how-to?

Juanjo Algaz
on 9/13/13, 4:18 PM 2,078 views

Hi, I have three modules and class:

  1. mail
  2. email_template
  3. my_module

Module 2, email_template, inherit mail.compose.message, from mail module, to add the templates selector

Now, with my_module I want to inherit mail.compose.message from email_template and not from mail module. This is for add some domain to method search on _get_templates function. I think, to solve this, I need to edit __openerp__.py and on depends, change the order, but this dont work!

I tried with:

'depends': ['base','mail','email_template'],


'depends': ['base','mail_template','email'],

Without results. How to inherit from my_module to email_template?

EDIT: I forgot to mention: I tried with only email_template on depends and I got not result again.

Finally, this work ok. I want to test, but, wich depends=base,mail, email_template my function work ok. Maybe the database are corruct, but for now, work. Thx!

Juanjo Algaz
on 9/16/13, 3:44 PM


| 5 3 8
Bogotá, Colombia
Informatics engineer Industrial engineer
On 9/13/13, 11:12 PM

email_template depends from mail, so you only need to depend from email_template

'depends': ['email_template'],

Sorry Felipe, I edit my post, this test has been proved without result

Juanjo Algaz
on 9/15/13, 8:06 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

0 follower(s)


Asked: 9/13/13, 4:18 PM
Seen: 2078 times
Last updated: 3/16/15, 8:10 AM