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

Moving custom data from crm.lead to sale.order while creating quotation from lead

By
Sayed Anisul Hoque
on 10/22/15, 12:59 AM 425 views

Hi,

I am trying to override the def makeOrder(self, cr, uid, ids, context=None): in sale_crm module and in the wizard crm_make_saly.py

Please check my source code from the below link:

http://pasted.co/44875063


But, I get the following error everytime. Please help in this regards

2015-10-22 04:51:57,346 7203 ERROR odoopy werkzeug: Error on request:

Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi

execute(self.server.app)

File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute

application_iter = app(environ, start_response)

File "/opt/odoo/odoo/openerp/service/server.py", line 290, in app

return self.app(e, s)

File "/opt/odoo/odoo/openerp/service/wsgi_server.py", line 216, in application

return application_unproxied(environ, start_response)

File "/opt/odoo/odoo/openerp/service/wsgi_server.py", line 202, in application_unproxied

result = handler(environ, start_response)

File "/opt/odoo/odoo/openerp/http.py", line 1290, in __call__

return self.dispatch(environ, start_response)

File "/opt/odoo/odoo/openerp/http.py", line 1264, in __call__

return self.app(environ, start_wrapped)

File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__

return self.app(environ, start_response)

File "/opt/odoo/odoo/openerp/http.py", line 1426, in dispatch

ir_http = request.registry['ir.http']

File "/opt/odoo/odoo/openerp/http.py", line 346, in registry

return openerp.modules.registry.RegistryManager.get(self.db) if self.db else None

File "/opt/odoo/odoo/openerp/modules/registry.py", line 339, in get

update_module)

File "/opt/odoo/odoo/openerp/modules/registry.py", line 370, in new

openerp.modules.load_modules(registry._db, force_demo, status, update_module)

File "/opt/odoo/odoo/openerp/modules/loading.py", line 351, in load_modules

force, status, report, loaded_modules, update_module)

File "/opt/odoo/odoo/openerp/modules/loading.py", line 255, in load_marked_modules

loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)

File "/opt/odoo/odoo/openerp/modules/loading.py", line 152, in load_module_graph

models = registry.load(cr, package)

File "/opt/odoo/odoo/openerp/modules/registry.py", line 163, in load

model = cls._build_model(self, cr)

File "/opt/odoo/odoo/openerp/models.py", line 596, in _build_model

original_module = pool[name]._original_module if name in parents else cls._module

File "/opt/odoo/odoo/openerp/modules/registry.py", line 102, in __getitem__

return self.models[model_name]

KeyError: 'crm.make.sale'

0
Sayed Anisul Hoque
On 10/22/15, 2:41 AM

I found the issue solved. I forgot to add "sale_crm" in depends. This solved my issue.

1

Baiju

--Baiju--
3154
| 5 4 8
Kochi, India
--Baiju--
ODOO technical and functional

        I like learning new thing, especially technical thing. I am a quick learner, I can learn technical things very fast. I have good logical skill,  I have immense interest in programming.

e-mail id : baijuks@hotmail.com

Baiju
On 10/22/15, 2:34 AM

Hi,


Please check that you included the inherited object Module name in your module __openerp__.py file [in 'depends'] ->

Normally if you don't it will give this kind of error.

For your code you have to include sale_crm to depend in __openerp__.py  file

Eg:-

'depends': ['base','sale_crm'],

Hope this helps.

Thanks Baiju, I have found the solutions :) Cheers !!

Sayed Anisul Hoque
on 10/22/15, 5:41 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

1 follower(s)

Stats

Asked: 10/22/15, 12:59 AM
Seen: 425 times
Last updated: 10/22/15, 2:41 AM