Skip to Content
Menu
This question has been flagged
1 Reply
3342 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!


Avatar
Discard
Author Best Answer

I can do this by using

from openerp import SUPERUSER_ID

in the beginning of own module

Avatar
Discard