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 no longer understand inheritance.
I am trying to override the name_get method of the model product.product which was overridden by a different module. My questions are:
Question 1: Why is my name_get method not triggered unless I put the original overriding module in my descriptor file. Ex. 'depends': 'product_custom'
Question 2: (overriding module is included in my descriptor file). My name_get gets called and context gets followed but after realeasing the mouse on the one2many_list field my context no longer get called setting the original overriding module name_get to be called.
THIS GETS CALLED WHEN ONE2MANY FIELD IS CLICKED
if context.get('marker', False):
for product in self.browse(cr, uid, ids, context):
name = product.name
THIS GETS CALLED WHEN ONE2MANY FIELD IS RELEASED
return super(overriding_module, self).name_get(cr, uid, ids, context)
I have added a marker on my XML and injected one using the fields_view_get method.
I have checked this links as reference https://www.odoo.com/forum/help-1/question/using-name-get-how-to-shows-two-different-display-values-2589#answer-57376, https://anybox.fr/blog/inside-openerp-inheritance
My question is similar to this question in stackoverflow http://stackoverflow.com/questions/30080690/openerp-multiple-module-overriding-onchange-function
Thanks in advance.
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: 8/8/15, 5:34 AM|
|Seen: 982 times|
|Last updated: 8/10/15, 6:10 PM|