Odoo Help

0

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

By
Amit Patel
on 11/25/13, 4:28 PM 2,137 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

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.

Register

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)

Stats

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