Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4220 Vizualizări

I'm trying to inherit an Export controller on OpenERP v7.0. I've tried some suggestions found on the web but with no success. Could someone point me to the right direction cuz I can't find a problem with my code.

The code below is within my custom module and it gets loaded during server launch.

import openerp.addons.web.controllers.main as main


class ExportFormatInherited(main.Export):
    _cp_path = "/web/export"

    @main.openerpweb.jsonrequest
    def get_fields(self, req, model, prefix='', parent_name= '',
                   import_compat=True, parent_field_type=None,
                   exclude=None):
        print 'inherited'
        super(ExportFormatInherited, self).get_fields(req, model, prefix,
                                                      parent_name, import_compat,
                                                      parent_field_type, exclude)
Imagine profil
Abandonează
Cel mai bun răspuns

Python super() and the MRO !!!

Not seeing what's in your code and in your log, all i can say is:

You should read the following:

Understanding Python’s ‘super’

Python’s super() considered super!

How to use super() effectively -- Python 2.7 version (Python recipe)

Method Resolution Order

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
dec. 23
18246
2
mar. 15
9876
2
iul. 25
1496
1
mai 25
963
2
mai 25
1610