Odoo Help

Welcome!

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.

0

Howto inherit name_get for product.product in Odoo 8? SUPERUSER_ID problem

By
Thomas Klosinsky
on 9/30/15, 4:41 PM 498 views

Hi there,


how do I inherit name_get function for product.prduct Model?

This line is making trouble when I put the whole function in my own module:


for product in self.browse(cr, SUPERUSER_ID, ids, context=context):

When Odoo 8 comes to use this function it throws out an error that the SUPERUSER id not defined or something.


How can I use the SUPERUSER in own modules or how can I work around when inheriting??

I am thankful for any help!


0
Thomas Klosinsky
On 9/30/15, 4:58 PM

I can do this by using

from openerp import SUPERUSER_ID

in the beginning of own module

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

1 follower(s)

Stats

Asked: 9/30/15, 4:41 PM
Seen: 498 times
Last updated: 9/30/15, 4:58 PM