Odoo Help

0

how does odoo prioritize conflicting model extensions

By
Alexander Soare
on 8/18/16, 5:45 AM 331 views

If I extend res.partner with two different custom addons how does Odoo prioritize which one applies first. For example, I might overwrite the original create method in both extensions like so:

class extend_partner(openerp.models.Model):
     _inherit = 'res.partner'
     
     @api.model
     def create(self):
         res = super(extend_partner, self).create(vals)
         # do custom stuff
         return res

What happens when I have two of the above extensions and the "#do custom stuff" code block conflicts or should be done in a certain order? Is there any place in the documentation that explains this in detail?

0
M
On 1/20/17, 6:15 AM

Did you ever figure this out? I now find myself with a similar situation. I need my module to be able to reference a field created by a module that inherits from a core model. When I try to reference it in my create method, the field is not yet available.

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

Question tools

1 follower(s)

Stats

Asked: 8/18/16, 5:45 AM
Seen: 331 times
Last updated: 1/20/17, 6:15 AM