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

TypeError: init() takes exactly 5 arguments (2 given)

By
Amit Patel
on 11/25/13, 4:28 PM 1,728 views
Server Traceback (most recent call last):
  File "/home/openerp/openerp/7.0/openerp7/openerp/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/openerp/openerp/7.0/openerp7/openerp/netsvc.py", line 295, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/openerp/openerp/7.0/openerp7/openerp/service/web_services.py", line 425, in dispatch
    return fn(*params)
  File "/home/openerp/openerp/7.0/openerp7/openerp/service/web_services.py", line 436, in exp_authenticate
    res_users = pooler.get_pool(db).get('res.users')
  File "/home/openerp/openerp/7.0/openerp7/openerp/pooler.py", line 49, in get_pool
    return get_db_and_pool(db_name, force_demo, status, update_module)[1]
  File "/home/openerp/openerp/7.0/openerp7/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module)
  File "/home/openerp/openerp/7.0/openerp7/openerp/modules/registry.py", line 192, in get
    update_module)
  File "/home/openerp/openerp/7.0/openerp7/openerp/modules/registry.py", line 214, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/home/openerp/openerp/7.0/openerp7/openerp/modules/loading.py", line 343, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module)
  File "/home/openerp/openerp/7.0/openerp7/openerp/modules/loading.py", line 258, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/openerp/openerp/7.0/openerp7/openerp/modules/loading.py", line 167, in load_module_graph
    init_module_models(cr, package.name, models)
  File "/home/openerp/openerp/7.0/openerp7/openerp/modules/module.py", line 378, in init_module_models
    obj.init(cr)
TypeError: init() takes exactly 5 arguments (2 given)

I'm not able to login please help.

How did the error came? If it was from any module you have developed, then goto postgres and in table ir_module_nodule of your database, change the state field of the module to "uninstalled" from "to upgrade". Now you can login, but remember this will not remove the error from your module.

Gopakumar N G
on 11/26/13, 8:54 AM

I was trying to add method in order.py and after modification my web client crashed and after my reboot of PC it was not allowing me to log in. so i revert back to default files and logged in!! Still don't know the reason.

Amit Patel
on 11/26/13, 2:33 PM

Did you add the method by inheriting the model in a new module?

Gopakumar N G
on 11/27/13, 12:50 AM

No I did not.

Amit Patel
on 12/9/13, 2:03 PM

Creating a new module and inheriting the model in that module is recommended. Can post the method you have added?

Gopakumar N G
on 12/10/13, 2:25 AM

But i just want two add two method in my RML. i'm not trying to create new module.

Amit Patel
on 12/10/13, 11:38 AM

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

0 follower(s)

Stats

Asked: 11/25/13, 4:28 PM
Seen: 1728 times
Last updated: 3/16/15, 8:10 AM