duplicate sale order NoneType ERROR - odoo

when i duplicate a sale order, show this error:
AttributeError: 'NoneType' object has no attribute 'search'
before this action works fine, but I don't know why this problem appears now.
here the detail of the error:
Server Traceback (most recent call last):
File "/openerp/sitios/onak/odoo-7.0/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/openerp/sitios/onak/odoo-7.0/openerp/netsvc.py", line 300, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/openerp/sitios/onak/odoo-7.0/openerp/service/web_services.py", line 632, in dispatch
res = fn(db, uid, *params)
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/osv.py", line 190, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/osv.py", line 132, in wrapper
return f(self, dbname, *args, **kwargs)
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/osv.py", line 199, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/osv.py", line 187, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/openerp/sitios/onak/odoo-7.0/addons/sale_stock/sale_stock.py", line 49, in copy
return super(sale_order, self).copy(cr, uid, id, default, context=context)
File "/openerp/community/addons/nuevo/sale_payment_method/sale.py", line 93, in copy
default, context=context)
File "/openerp/community/addons/nuevo/sale_exceptions/sale.py", line 262, in copy
cr, uid, id, default=default, context=context)
File "/openerp/sitios/onak/odoo-7.0/addons/sale/sale.py", line 80, in copy
return super(sale_order, self).copy(cr, uid, id, default, context=context)
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/orm.py", line 5171, in copy
data = self.copy_data(cr, uid, id, default, context)
File "/openerp/community/addons/nuevo/magentoerpconnect/sale.py", line 163, in copy_data
context=context)
File "/openerp/sitios/onak/odoo-7.0/addons/mail/mail_thread.py", line 331, in copy_data
return super(mail_thread, self).copy_data(cr, uid, id, default=default, context=context)
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/orm.py", line 5083, in copy_data
lines = [other.copy_data(cr, uid, line_id, context=context) for line_id in sorted(data[f])]
File "/openerp/community/addons/nuevo/magentoerpconnect/sale.py", line 301, in copy_data
context=context)
File "/openerp/sitios/onak/odoo-7.0/addons/sale/sale.py", line 868, in copy_data
return super(sale_order_line, self).copy_data(cr, uid, id, default, context=context)
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/orm.py", line 5068, in copy_data
data = self.read(cr, uid, [id], fields_to_copy.keys(), context=context)
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/orm.py", line 3707, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/orm.py", line 3830, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
File "/openerp/sitios/onak/odoo-7.0/openerp/osv/fields.py", line 542, in get
ids2 = obj.pool.get(self._obj).search(cr, user, domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
AttributeError: 'NoneType' object has no attribute 'search'
somebody may help me please..
regards,

Related

OpenERP - ValueError: No such external ID currently defined in the system: project.group_project_manager

I am new to OpenERP. I am getting this error while installing Project Management Module.
am not able to find where it went wrong.
Here is the error log:`
K-SOFT ERP Server Error
Client Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/http.py", line 195, in dispatch
response["result"] = method(self, **self.params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/controllers/main.py", line 1083, in call_button
action = self._call_kw(req, model, method, args, {}) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/controllers/main.py", line 1071, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/session.py", line 43, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/session.py", line 31, in proxy_method
result = self.session.send(self.service_name, method, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/session.py", line 104, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/web/session.py", line 90, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/netsvc.py", line 295, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/service/web_services.py", line 614, in dispatch
res = fn(db, uid, *params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/osv/osv.py", line 188, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {}) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/osv/osv.py", line 198, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/base/module/module.py", line 425, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/base/module/module.py", line 476, in _button_immediate_function
_, pool = pooler.restart_pool(cr.dbname, update_module=True) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/pooler.py", line 39, in restart_pool
registry = RegistryManager.new(db_name, force_demo, status, update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/registry.py", line 214, in new
openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/loading.py", line 347, in load_modules
processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/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 "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/loading.py", line 189, in load_module_graph
load_update_xml(module_name, idref, mode) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/loading.py", line 73, in <lambda>
load_update_xml = lambda *args: _load_data(cr, *args, kind='update_xml') File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/modules/loading.py", line 126, in _load_data
tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 954, in convert_xml_import
obj.parse(doc.getroot()) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 847, in parse
self._tags[rec.tag](self.cr, rec, n) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 652, in _tag_menuitem
group_id = self.id_get(cr, group) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 824, in id_get
res = self.model_id_get(cr, id_str) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/convert.py", line 833, in model_id_get
return model_data_obj.get_object_reference(cr, self.uid, mod, id_str) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/cache.py", line 18, in lookup
r = self.lookup(self2, cr, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/cache.py", line 46, in lookup
value = d[key] = self.method(self2, cr, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/base/ir/ir_model.py", line 865, in get_object_reference
data_id = self._get_id(cr, uid, module, xml_id) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/cache.py", line 18, in lookup
r = self.lookup(self2, cr, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/tools/cache.py", line 46, in lookup
value = d[key] = self.method(self2, cr, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons/base/ir/ir_model.py", line 858, in _get_id
raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id)) ValueError: No such external ID currently defined in the system: project.group_project_manager
Can I have any suggestions regarding this?

Bug in Odoo gamification addon

When I create a goal definition with:
computation mode : (Automatic: sum on a field,
Model : Sale Order Line,
Field to Sum : SubTotal)
When I add this goal definition to a challenge and try to start it, I get this traceback:
Client Traceback (most recent call last):
File "/home/openerp/server/openerp/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params)
File "/home/openerp/server/openerp/addons/web/controllers/main.py", line 1132, in call_button
action = self._call_kw(req, model, method, args, {})
File "/home/openerp/server/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/home/openerp/server/openerp/addons/web/session.py", line 42, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/home/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/home/openerp/server/openerp/addons/web/session.py", line 103, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/home/openerp/server/openerp/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/home/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/openerp/server/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/home/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/openerp/server/openerp/osv/osv.py", line 132, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/openerp/server/openerp/osv/osv.py", line 199, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/openerp/server/openerp/addons/gamification/plan.py", line 342, in action_start
return self.generate_goals_from_plan(cr, uid, ids, context=context)
File "/home/openerp/server/openerp/addons/gamification/plan.py", line 439, in generate_goals_from_plan
goal_obj.update(cr, uid, [new_goal_id], context=context)
File "/home/openerp/server/openerp/addons/gamification/goal.py", line 278, in update
new_value = res and res[0][field_name] or 0.0
KeyError: u'price_subtotal'
this is a video that shows the scenario that I did: http://youtu.be/b546xTc1ArY

Error Generation While upgrading the OpenERP Module

Error is generated while i am upgrading my module in OpenERP
res_model not found error
Error:
Client Traceback (most recent call last):
File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params)
File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 993, in load
menu_root_ids = self.get_user_roots(req)
File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 979, in get_user_roots
return Menus.search(menu_domain, 0, False, False, req.context) File "/opt/openerp/server/openerp/addons/web/session.py", line 42, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/opt/openerp/server/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/server/openerp/addons/mail/mail_group_menu.py", line 44, in search
ids = super(ir_ui_menu, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=False)
File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_menu.py", line 127, in search
result = self._filter_visible_menus(cr, uid, ids, context=context)
File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_menu.py", line 103, in _filter_visible_menus
if not menu.child_id:
File "/opt/openerp/server/openerp/osv/orm.py", line 497, in __getattr__
return self[name]
File "/opt/openerp/server/openerp/osv/orm.py", line 405, in __getitem__
field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
File "/opt/openerp/server/openerp/osv/orm.py", line 3621, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/opt/openerp/server/openerp/osv/orm.py", line 3742, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
File "/opt/openerp/server/openerp/osv/fields.py", line 538, in get
ids2 = obj.pool.get(self._obj).search(cr, user, domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
File "/opt/openerp/server/openerp/addons/mail/mail_group_menu.py", line 44, in search
ids = super(ir_ui_menu, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=False)
File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_menu.py", line 127, in search
result = self._filter_visible_menus(cr, uid, ids, context=context)
File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_menu.py", line 103, in _filter_visible_menus
if not menu.child_id:
File "/opt/openerp/server/openerp/osv/orm.py", line 499, in __getattr__
raise AttributeError(e)
AttributeError: 'Field res_model not found in browse_record(ir.actions.act_window, 494)'
This is rather ambiguous question.
What version of openERP is in problem here?
In OE7, only ir_act_window has res_model, I don't even see model that you provided (ir.actions.act_window). Same in OE8.
If you could specify what is going, is this your module/extension? It would help a lot.
In my case, I have deleted a xml file for which menu item is created.As i have deleted the file,the menu item is searching for it and it is throwing the error.So finally i resolved the issue by deleting the Menu item.

Memory erron in openerp 6.1

When physical inventory is been set to make the stock moves to zero value, it runs for a long time and throws an error like memory error.
Nearly 2000 products are in stock location we need to make the real stock zero.
ERROR:
File "/home/administrator/workspace/server/openerp/osv/osv.py", line 121, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/administrator/workspace/server/openerp/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/administrator/workspace/server/openerp/osv/osv.py", line 164, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/administrator/workspace/addons/stock/stock.py", line 2665, in action_done
move_obj.action_done(cr, uid, inventory_move_ids, context=context)
File "/home/administrator/workspace/addons/stock/stock.py", line 2253, in action_done
self._create_product_valuation_moves(cr, uid, move, context=context)
File "/home/administrator/workspace/addons/stock/stock.py", line 2187, in _create_product_valuation_moves
if move.product_id.valuation == 'real_time': # FIXME: product valuation should perhaps be a property?
File "/home/administrator/workspace/server/openerp/osv/orm.py", line 476, in __getattr__
return self[name]
File "/home/administrator/workspace/server/openerp/osv/orm.py", line 391, in __getitem__
field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
File "/home/administrator/workspace/server/openerp/osv/orm.py", line 3416, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/home/administrator/workspace/server/openerp/osv/orm.py", line 3476, in _read_flat
res.extend(cr.dictfetchall())
File "/usr/lib/python2.7/dist-packages/psycopg2/psycopg1.py", line 91, in dictfetchall
rows = _2cursor.fetchall(self)
MemoryError

How to create a many2one field in OpenERP 7

There are no docs for OpenERP 7 for this: I am trying to create a field with many2one relation from the webclient. I did the following:
1st step created a model and assigned some fields to it
2nd I created a field and mapped the model from the field and when I append that field in view I have been getting this error
Client Traceback (most recent call last):
File "/opt/openerp/web/addons/web/http.py", line 195, in dispatch
response["result"] = method(self, **self.params)
File "/opt/openerp/web/addons/web/controllers/main.py", line 1085, in call_kw
return self._call_kw(req, model, method, args, kwargs)
File "/opt/openerp/web/addons/web/controllers/main.py", line 1077, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/opt/openerp/web/addons/web/session.py", line 40, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/opt/openerp/web/addons/web/session.py", line 28, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/opt/openerp/web/addons/web/session.py", line 101, in send
raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)
Server Traceback (most recent call last):
File "/opt/openerp/web/addons/web/session.py", line 87, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/opt/openerp/server/openerp/netsvc.py", line 361, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp/server/openerp/service/web_services.py", line 601, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp/server/openerp/osv/osv.py", line 167, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/server/openerp/osv/osv.py", line 121, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/server/openerp/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/server/openerp/osv/osv.py", line 164, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/server/openerp/osv/orm.py", line 2389, in name_search
return self._name_search(cr, user, name, args, operator, context, limit)
File "/opt/openerp/server/openerp/osv/orm.py", line 2420, in _name_search
ids = self._search(cr, user, args, limit=limit, context=context, access_rights_uid=access_rights_uid)
File "/opt/openerp/server/openerp/osv/orm.py", line 4773, in _search
query = self._where_calc(cr, user, args, context=context)
File "/opt/openerp/server/openerp/osv/orm.py", line 4622, in _where_calc
e = expression.expression(cr, user, domain, self, context)
File "/opt/openerp/server/openerp/osv/expression.py", line 371, in __init__
self.parse(cr, uid, distribute_not(normalize(exp)), table, context)
File "/opt/openerp/server/openerp/osv/expression.py", line 468, in parse
raise ValueError("Invalid field %r in domain expression %r" % (left, exp))
ValueError: Invalid field 'x_totalexp' in domain expression ['&', '&', ('x_totalexp', '=', 0), ['id', 'not in', []], ('name', 'ilike', 's')]
Is this a bug or i am doing it wrong
Its working now. I also faced the same problem but after "bzr pull", problem get solved.
Just update your 7.0 addons, web & server.