Odoo Help


How can I port custom module looking for web.common import?

Raquel Jeanne Corpuz Gumtang
on 2/17/14, 2:04 AM 829 views

Does anyone know how to install custom module from 6.1 looking for web.common on OpenERP 7? Here is the code that will have to be rewritten so the module can be used in 7.

try: # embedded from openerp.addons.web import common import openerp.addons.web.common.http as openerpweb from openerp.addons.web.controllers.main import Reports except ImportError: # standalone from web import common import web.common.http as openerpweb from web.controllers.main import Reports

class custom_class_name(inherited_class_name):

class PrintOutFileName(Reports): # URL defined in addons/custom_module/static/src/views.js _cp_path = "/fs3_web_printout/report"

def index(self, req, action, token):
    action = simplejson.loads(action)

    report_srv = req.session.proxy("report")
    context = req.session.eval_context(
            req.context or {}, action[ "context"]))

    report_data = {}
    report_ids = context["active_ids"]
    if 'report_type' in action:
        report_data['report_type'] = action['report_type']
    if 'datas' in action:
        if 'ids' in action['datas']:
            report_ids = action['datas'].pop('ids')

I'm new to python and OpenERP so anyone who can point me to the right projects to import would be a really big help.

Thank you!

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.


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

0 follower(s)


Asked: 2/17/14, 2:04 AM
Seen: 829 times
Last updated: 3/16/15, 8:10 AM